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

    Access EntityContext from EntityListener

    irahayes

      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