Hi,
it is possible to user service injections inside a @EntityListeners
annotated class?
I've tried to put the class in app.base, app.entites and app.service
packages, but the injected field is always null.

My code looks like:

public class EntityJpaListener {
    @Inject
    private SomeService    service;

    @PrePersist
    public void onPrePersist(Object entity) {
        if (entity instanceof SomeEntity) {
            System.err.println(service); // allways is null
        }
    }
}

@Entity
@EntityListeners(EntityJpaListener .class)
public class SomeEntity extends EntitySuperclass { // EntitySuperclass
is a @MappedSuperclass
...
}

Thanks
Eugen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to