0 Replies Latest reply on May 27, 2007 2:05 PM by Avihai Marchiano

    How to work with multiple persistence units

    Avihai Marchiano Novice


      I have a generic DAO.
      The DAO is a stateless and in the DAO the persistence context is injected:

       public void setEntityManager(EntityManager em) {
       this.em = em;

      The problem is that I have more than 5 schemas.
      Each schema has a persistence unit, so I can?t use in the default persistence unit.

      How you guys work in case that you have multiple schemas?
      How can i get the persistence context on the fly?

      Thank you