geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1053320 - /geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
Date Tue, 28 Dec 2010 12:06:54 GMT
Author: genspring
Date: Tue Dec 28 12:06:54 2010
New Revision: 1053320

URL: http://svn.apache.org/viewvc?rev=1053320&view=rev
Log:
Fix deployment errors in full profile caused by searching jndiName as the gbean name.

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java

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=1053320&r1=1053319&r2=1053320&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
Tue Dec 28 12:06:54 2010
@@ -289,7 +289,15 @@ public abstract class AbstractNamingBuil
     }
 
     public static AbstractNameQuery buildAbstractNameQuery(Artifact configId, String module,
String name, String type, String moduleType) {
-        return ENCConfigBuilder.buildAbstractNameQuery(configId, module, name, type, moduleType);
+        return ENCConfigBuilder.buildAbstractNameQuery(configId, module, normalizeJndiName(name),
type, moduleType);
+    }
+    
+    private static String normalizeJndiName(String name) {
+        if (name.indexOf("java:comp/env/") != -1) {
+            return name.substring("java:comp/env/".length(), name.length());
+        } else {
+            return name.trim();
+        }
     }
 
     public static Class assureInterface(String interfaceName, String superInterfaceName,
String interfaceType, Bundle bundle) throws DeploymentException {



Mime
View raw message