geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r983157 - in /geronimo/server/trunk/plugins: connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/depl...
Date Sat, 07 Aug 2010 00:53:17 GMT
Author: gawor
Date: Sat Aug  7 00:53:16 2010
New Revision: 983157

URL: http://svn.apache.org/viewvc?rev=983157&view=rev
Log:
jndi normalization fixes

Modified:
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java
    geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/OpenEjbCorbaRefBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceRefBuilder.java

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
Sat Aug  7 00:53:16 2010
@@ -378,7 +378,7 @@ public class AdminObjectRefBuilder exten
         if (refs != null) {
             for (XmlObject ref1 : refs) {
                 GerResourceEnvRefType ref = (GerResourceEnvRefType) ref1.copy().changeType(GerResourceEnvRefType.type);
-                refMap.put(ref.getRefName().trim(), ref);
+                refMap.put(getJndiName(ref.getRefName().trim()), ref);
             }
         }
         return refMap;

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
Sat Aug  7 00:53:16 2010
@@ -293,7 +293,7 @@ public class ResourceRefBuilder extends 
         if (refs != null) {
             for (XmlObject ref1 : refs) {
                 GerResourceRefType ref = (GerResourceRefType) ref1.copy().changeType(GerResourceRefType.type);
-                refMap.put(ref.getRefName().trim(), ref);
+                refMap.put(getJndiName(ref.getRefName().trim()), ref);
             }
         }
         return refMap;

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java
Sat Aug  7 00:53:16 2010
@@ -137,7 +137,7 @@ public class DataSourceBuilder extends A
     private void addDataSourceGBean(Module module, Map<EARContext.Key, Object> sharedContext,
DataSource ds, String name)
         throws GBeanAlreadyExistsException {
                         
-        String jndiName = ds.getName();
+        String jndiName = ds.getKey();
         
         if (lookupJndiContextMap(module, jndiName) != null) {
             return;

Modified: geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/OpenEjbCorbaRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/OpenEjbCorbaRefBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/OpenEjbCorbaRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/OpenEjbCorbaRefBuilder.java
Sat Aug  7 00:53:16 2010
@@ -104,8 +104,7 @@ public class OpenEjbCorbaRefBuilder exte
         Bundle bundle = module.getEarContext().getDeploymentBundle();
 
         for (EjbRef ejbRef : ejbRefsUntyped) {
-
-            String ejbRefName = getStringValue(ejbRef.getEjbRefName());
+            String ejbRefName = getStringValue(ejbRef.getKey());
             GerEjbRefType remoteRef = (GerEjbRefType) ejbRefMap.get(ejbRefName);
 
             Reference ejbReference = addEJBRef(module, ejbRef, remoteRef, bundle);
@@ -169,7 +168,7 @@ public class OpenEjbCorbaRefBuilder exte
         if (refs != null) {
             for (int i = 0; i < refs.length; i++) {
                 GerEjbRefType ref = (GerEjbRefType) refs[i];
-                refMap.put(ref.getRefName().trim(), ref);
+                refMap.put(getJndiName(ref.getRefName().trim()), ref);
             }
         }
         return refMap;

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
Sat Aug  7 00:53:16 2010
@@ -185,8 +185,8 @@ public abstract class AbstractNamingBuil
     }
 
 
-    protected String getJndiName(String name) {
-        if (name.indexOf(':') != -1) {   
+    protected static String getJndiName(String name) {
+        if (name.indexOf(':') == -1) {   
             return "java:comp/env/" + name;
         } else {
             return name;

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java
Sat Aug  7 00:53:16 2010
@@ -198,17 +198,12 @@ public class EnvironmentEntryBuilder ext
         if (refs != null) {
             for (XmlObject ref1 : refs) {
                 GerEnvEntryType ref = (GerEnvEntryType) ref1.copy().changeType(GerEnvEntryType.type);
-                envEntryMap.put(gNormalize(ref.getEnvEntryName().trim()), ref.getEnvEntryValue());
+                envEntryMap.put(getJndiName(ref.getEnvEntryName().trim()), ref.getEnvEntryValue());
             }
         }
         return envEntryMap;
     }
 
-    private String gNormalize(String s) {
-        if (s.startsWith("java:")) return s;
-        return "java:comp/env/" + s;
-    }
-
     public QNameSet getSpecQNameSet() {
         return envEntryQNameSet;
     }

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=983157&r1=983156&r2=983157&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
Sat Aug  7 00:53:16 2010
@@ -365,7 +365,7 @@ public class EjbRefBuilder extends Abstr
         if (xmlObjects != null) {
             for (XmlObject xmlObject : xmlObjects) {
                 GerEjbRefType ref = (GerEjbRefType) xmlObject.copy().changeType(GerEjbRefType.type);
-                refMap.put(ref.getRefName().trim(), ref);
+                refMap.put(getJndiName(ref.getRefName().trim()), ref);
             }
         }
         return refMap;
@@ -383,7 +383,7 @@ public class EjbRefBuilder extends Abstr
         if (xmlObjects != null) {
             for (XmlObject xmlObject : xmlObjects) {
                 GerEjbLocalRefType ref = (GerEjbLocalRefType) xmlObject.copy().changeType(GerEjbLocalRefType.type);
-                refMap.put(ref.getRefName().trim(), ref);
+                refMap.put(getJndiName(ref.getRefName().trim()), ref);
             }
         }
         return refMap;

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceRefBuilder.java?rev=983157&r1=983156&r2=983157&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceRefBuilder.java
Sat Aug  7 00:53:16 2010
@@ -301,7 +301,7 @@ public class PersistenceRefBuilder exten
         if (plan != null) {
             List<GerPersistenceUnitRefType> refs = convert(plan.selectChildren(PersistenceRefBuilder.GER_PERSISTENCE_UNIT_REF_QNAME_SET),
NAMING_CONVERTER, GerPersistenceUnitRefType.class, GerPersistenceUnitRefType.type);
             for (GerPersistenceUnitRefType ref : refs) {
-                map.put(ref.getPersistenceUnitRefName().trim(), ref);
+                map.put(getJndiName(ref.getPersistenceUnitRefName().trim()), ref);
             }
         }
         return map;
@@ -321,7 +321,7 @@ public class PersistenceRefBuilder exten
         if (plan != null) {
             List<GerPersistenceContextRefType> refs = convert(plan.selectChildren(GER_PERSISTENCE_CONTEXT_REF_QNAME_SET),
NAMING_CONVERTER, GerPersistenceContextRefType.class, GerPersistenceContextRefType.type);
             for (GerPersistenceContextRefType ref : refs) {
-                map.put(ref.getPersistenceContextRefName().trim(), ref);
+                map.put(getJndiName(ref.getPersistenceContextRefName().trim()), ref);
             }
         }
         return map;



Mime
View raw message