tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject git commit: when module name starts with / then we have to remove it before binding it in JNDI
Date Wed, 05 Nov 2014 09:01:03 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 8ec04c239 -> b888550b8


when module name starts with / then we have to remove it before binding it in JNDI


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b888550b
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b888550b
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b888550b

Branch: refs/heads/tomee-1.7.x
Commit: b888550b8d4147828878c8a46b78af73d7e96cdd
Parents: 8ec04c2
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Wed Nov 5 08:59:34 2014 +0000
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Wed Nov 5 08:59:34 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/openejb/assembler/classic/JndiBuilder.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/b888550b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
index 906a962..11a12a8 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
@@ -689,7 +689,11 @@ public class JndiBuilder {
         final Context globalContext = application.getGlobalJndiContext();
 
         final String appName = application.isStandaloneModule() ? "" : application.getId()
+ "/";
-        final String moduleName = cdi.getModuleName() + "/";
+        String moduleName = cdi.getModuleName() + "/";
+        if (moduleName.startsWith("/")) {
+            moduleName = moduleName.substring(1);
+        }
+
         String beanName = cdi.getEjbName();
         if (intrface != null) {
             beanName = beanName + "!" + intrface.getName();


Mime
View raw message