geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r981651 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Date Mon, 02 Aug 2010 18:24:39 GMT
Author: gawor
Date: Mon Aug  2 18:24:39 2010
New Revision: 981651

URL: http://svn.apache.org/viewvc?rev=981651&view=rev
Log:
fix ejb ref builder

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=981651&r1=981650&r2=981651&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
Mon Aug  2 18:24:39 2010
@@ -128,9 +128,20 @@ public class EjbRefBuilder extends Abstr
             jndiEncInfoBuilder.build(specDD, "GeronimoEnc", moduleId, moduleJndiEnc, compJndiEnc);
             
             JndiEncInfo ejbEncInfo = new JndiEncInfo();
+            
+            // add java:global/
+            ejbEncInfo.ejbReferences.addAll(appInfo.globalJndiEnc.ejbReferences);
+            ejbEncInfo.ejbLocalReferences.addAll(appInfo.globalJndiEnc.ejbLocalReferences);
+            
+            // add java:app/
+            ejbEncInfo.ejbReferences.addAll(appInfo.appJndiEnc.ejbReferences);
+            ejbEncInfo.ejbLocalReferences.addAll(appInfo.appJndiEnc.ejbLocalReferences);
+            
+            // add java:module/            
             ejbEncInfo.ejbReferences.addAll(moduleJndiEnc.ejbReferences);
             ejbEncInfo.ejbLocalReferences.addAll(moduleJndiEnc.ejbLocalReferences);
             
+            // add java:comp/
             ejbEncInfo.ejbReferences.addAll(compJndiEnc.ejbReferences);
             ejbEncInfo.ejbLocalReferences.addAll(compJndiEnc.ejbLocalReferences);
 
@@ -145,17 +156,16 @@ public class EjbRefBuilder extends Abstr
             String name = entry.getKey();
             Object value = entry.getValue();
 
-            // work with names prefixed with java:comp/
-            if (name.startsWith("env/") ||
-                    name.startsWith("java:global/") ||
-                    name.startsWith("java:app/") ||
-                    name.startsWith("java:module/") ||
-                    name.startsWith("java:comp/")) {
+            // work with names in different namespaces
+            if (name.startsWith("global/") ||
+                    name.startsWith("app/") ||
+                    name.startsWith("module/") ||
+                    name.startsWith("comp/")) {
                 if (uri != null) {
                     value = createClientRef(value);
                 }
                 if (value instanceof Serializable) {
-                    put(name, value, module.getJndiContext());
+                    put("java:" + name, value, module.getJndiContext());
                 }
             }
         }



Mime
View raw message