1 2 Previous Next 21 Replies Latest reply on Oct 2, 2007 4:28 AM by saschaq benson

    How to Extend Persistence Context Programatically

    saschaq benson Newbie

      How can i extend the PersistenceContext Programmatically ?

      For Example:

      @PersistenceContext( type=PersistenceContextType.EXTENDED)
      EntityManager em;

      that doesn't work, because i have more than one Persistcence-unit.

      i'm getting the Entitymanager via:

      EntityManager em = (EntityManager)Component.getInstance("entityManager");


      But its not extended, so if i'am using the EntityManager in a Stateful Session Bean, the DataSelection Modell will not work.

      So how can i extend the PersistenceContext also?

        1 2 Previous Next