0 Replies Latest reply on Nov 27, 2007 9:34 AM by cpopetz

    ManagedPersistenceContext with multiple deployments

    cpopetz

      I have multiple ears which are built out of the same source tree on different branches that need to co-exist in one Jboss instance. I can use scoped repositories to ensure the classes don't conflict, but I'm trying to determine the best way to avoid the conflict that occurs with Seam's ManagedPersistenceContext, which wants a global jndi reference to an entityManagerFactory. It seems I have to modify each branch to have a unique jboss.entity.manager.factory.jndi.name in persistence.xml (and a matching persistence-unit-jndi-name in components.xml. )

      What I'd really like is for ManagedPersistenceContext to be able to use the ENC scoped persistenceContext, i.e. not a global jndi reference. I tried setting the jndi factory string in both to be java:comp/env/* instead of just java:/*, but I get errors on startup when trying that.

      Any tips would be appreciated.