0 Replies Latest reply on Oct 11, 2006 3:22 AM by Andrew Rubinger

    EntityManager and EntityManagerFactory rebind in JNDI

    Andrew Rubinger Master

      Hoping for opinions on a feature request.

      If multiple persistence units are defined and configured incorrectly by the developer to be bound to the same JNDI address, new EntityManagers and EntityManagerFactories silently replace the old ones in JNDI via a call to InitialContext "rebind".

      I'd like to modify this to either throw a RuntimeException if the requested destination address is already bound, or at least issue a WARN-level log statement.

      If approved I'll open a feature request in JIRA and submit relevant code in org.jboss.ejb3.entity.PersistenceUnitDeployment.start() to address.

      Thanks, all.