geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rex Wang (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GERONIMO-6191) can not query the persistence unit gbean when ejb is in a war
Date Thu, 13 Oct 2011 12:31:12 GMT
can not query the persistence unit gbean when ejb is in a war
-------------------------------------------------------------

                 Key: GERONIMO-6191
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6191
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: persistence
    Affects Versions: 3.0
            Reporter: Rex Wang
            Assignee: Rex Wang
             Fix For: 3.0


When deploy a war which contains persistence.xml and ejbs, the persistent unit builder add
the following gbean data to the earcontext:
default/org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest/1318412097703/war?J2EEApplication=null,PersistenceUnitModule=WEB-INF/classes/,WebModule=default/org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest/1318412097703/war,j2eeType=PersistenceUnit,name=test=org.apache.geronimo.gbean.GBeanData@d1a87

but in the EjbDeploymentBuilder's line 209,
It uses a pattern as following to query the persistent unit gbean data:
[?EJBModule=.,J2EEApplication=null,WebModule=default/org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest/1318411456796/war,j2eeType=PersistenceUnit#org.apache.geronimo.persistence.PersistenceUnitGBean]

We can see it contains a constraint "EJBModule=.", which cause the query return empty. That
lead the DeploymentException("No default PersistenceUnit specified, and none located");

This is because the ejb module and the war module share the same earcontext and the configuration

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message