[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1160) EMF implicit lookup/resolve precedence

Christian Bauer (JIRA) jira-events at lists.jboss.org
Tue Apr 10 06:22:58 EDT 2007

EMF implicit lookup/resolve precedence

                 Key: JBSEAM-1160
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1160
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Core
            Reporter: Christian Bauer

Currently impossible to use WAR deployment and Unit testing. Only way to configure it is as follows:

    <core:managed-persistence-context name="entityManager"

    <core:entity-manager-factory installed="@seamPersistenceUnit@" name="wikiEntityManagerFactory" persistence-unit-name="wiki"/>

    <core:ejb installed="@embeddedEjb@"/>

So either the EMF is started by Seam during WAR deployment (seamPersistenceUnit) and available as a component instance in application scope, or the EMF is deployed by the E-EJB3 container and bound to JNDI with the magic JBoss configuration property in persistence.xml.

The managed-persistence-context now needs to access the EMF polymorphically, no matter where it is bound. If you try the above code, you will see that the entity-manager-factory attribute always has precedence, and if it resolves to null, you get an NPE. Instead, the JNDI lookup should be attempted.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list