I have an EntityListener class which I am deploying as a default EntityListener for all entities within the same persistence manager package.
Is there an "official" (or any other) way I can access the EntityContext thats associated with the entity passed into a method in the EntityListener along the lines of:
public class MyBoringEntityListener {
@PrePersist
void prePersist(Object entity) {
// do something with the EntityContext here...
}
}
Thanks,
Andy
Ahh, I think brain death has set in...
It's EJB3 - no EntityContext.
I've just tried using the SecurityAssociation in my listener and it works fine.