Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Problems with inter type declaring @PersistenceContext annotated EntityManager attribute in interface

Hi all,

I have an aspect like that:

declare parents: MyClass1 || MyClass2 implements HasEntityManager;

@PersistenceContext
private EntityManager HasEntityManager.entityManager;

However, when I start my app in Glassfish, I get:

SEVERE: Injection method name must start with "set"
 symbol: javax.persistence.PersistenceContext
 location: public static void edu.tcc.t2.infra.RepositoryJPA.ajc$interFieldInit$edu_tcc_t2_infra_RepositoryJPA$edu_tcc_t2_infra_HasEntityManager$entityManager(edu.tcc.t2.infra.HasEntityManager)

I'm using field-based annotation, so, it couldn't happen.
Anyone knows how to solve it?

Thanks.

PS: MyClass1 and MyClass2 are JSF managed beans.


Back to the top