geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1145900 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/XBeanJndiFactory.java
Date Wed, 13 Jul 2011 08:06:09 GMT
Author: xuhaihong
Date: Wed Jul 13 08:06:09 2011
New Revision: 1145900

URL: http://svn.apache.org/viewvc?rev=1145900&view=rev
Log:
GERONIMO-6074 Do not bind/unbind the empty global/env context on the openejb root context

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/XBeanJndiFactory.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/XBeanJndiFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/XBeanJndiFactory.java?rev=1145900&r1=1145899&r2=1145900&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/XBeanJndiFactory.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/XBeanJndiFactory.java
Wed Jul 13 08:06:09 2011
@@ -84,8 +84,12 @@ public class XBeanJndiFactory implements
 
     public void addGlobals(Map<String, Object> globals) {
         for (Map.Entry<String, Object> entry: globals.entrySet()) {
+            //No need to bind/unbind the empty global/env context built in ApplicationJndi

+            if (entry.getKey().equals("global/env")) {
+                continue;
+            }
             String name = "openejb/global/" + entry.getKey();
-            try {
+            try {                
                 rootContext.bind(name, entry.getValue());
             } catch (NamingException e) {
                 //??
@@ -95,6 +99,9 @@ public class XBeanJndiFactory implements
 
     public void removeGlobals(Map<String, Object> globals) {
         for (Map.Entry<String, Object> entry: globals.entrySet()) {
+            if(entry.getKey().equals("global/env")) {
+                continue;
+            }
             String name = "openejb/global/" + entry.getKey();
             try {
                 rootContext.unbind(name);



Mime
View raw message