1 Reply Latest reply on Sep 1, 2006 5:51 AM by Andy Redhead

    Access EntityContext from EntityListener

    Andy Redhead Newbie

      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