5 Replies Latest reply on Mar 3, 2011 4:27 PM by Sean Tozer

    Are @EntityListeners with injection possible?

    Craig  Newbie

      Hi i have an @EntityListener on an entity that listens to PrePersist events.  The method gets called fine however, done of my injected properties are set. 


      I can get one by doing



      Account account = (Account) Contexts.getSessionContext().get("account");
      



      but how do i get my entityManager?


      Thanks


      Craig