5 Replies Latest reply on Mar 9, 2010 4:21 PM by Pete Muir

    Transaction scoped persistence contexts

    Wujek Srujek Newbie

      When we use a Stateless Session Bean and have @PersistenceContext injected the 'old' way, each time the bean is used, say, from a servlet, the context is freshly injected.
      How does it work with CDI injection? Suppose I have a @PersistenceContext @Produces field as outlined in the specs and Weld docs - when is the @PersistenceContext actually injected into the producer field, and looked up to initialize a Stateless Session Bean? Does this happen for every JNDI lookup / @EJB / @Inject of the bean in question?