geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1177170 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Date Thu, 29 Sep 2011 05:47:31 GMT
Author: xuhaihong
Date: Thu Sep 29 05:47:31 2011
New Revision: 1177170

URL: http://svn.apache.org/viewvc?rev=1177170&view=rev
Log:
GERONIMO-6180 Remove persistence reference information from AppInfo, EJB builder should not
process them

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java?rev=1177170&r1=1177169&r2=1177170&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Thu Sep 29 05:47:31 2011
@@ -137,11 +137,7 @@ public class EjbRefBuilder extends Abstr
         try {
             EjbModuleBuilder.EarData earData = EjbModuleBuilder.EarData.KEY.get(module.getRootEarContext().getGeneralData());
 
-            AppInfo appInfo = new AppInfo();
-
-            if (earData != null) {
-               appInfo = earData.getAppInfo();
-            }
+            AppInfo appInfo = earData != null ? earData.getAppInfo() : new AppInfo();
 
             JndiEncInfoBuilder jndiEncInfoBuilder = new JndiEncInfoBuilder(appInfo);
             JndiEncInfo moduleJndi = new JndiEncInfo();
@@ -150,6 +146,13 @@ public class EjbRefBuilder extends Abstr
             String moduleId = module.getName();
             jndiEncInfoBuilder.build(specDD, "GeronimoEnc", moduleId, module.getModuleURI(),
moduleJndi, compJndi);
 
+
+            //No need to keep the persistence references, as they will be handled by Geronimo
+            appInfo.globalJndiEnc.persistenceContextRefs.clear();
+            appInfo.globalJndiEnc.persistenceUnitRefs.clear();
+            appInfo.appJndiEnc.persistenceContextRefs.clear();
+            appInfo.appJndiEnc.persistenceUnitRefs.clear();
+
             JndiEncInfo ejbEncInfo = new JndiEncInfo();
             ejbEncInfo.ejbReferences.addAll(appInfo.globalJndiEnc.ejbReferences);
             ejbEncInfo.ejbReferences.addAll(appInfo.appJndiEnc.ejbReferences);



Mime
View raw message