You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2014/11/05 10:00:54 UTC
git commit: when module name starts with / then we have to remove it
before binding it in JNDI
Repository: tomee
Updated Branches:
refs/heads/develop 2e8c2c47c -> 15d307e71
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/15d307e7
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/15d307e7
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/15d307e7
Branch: refs/heads/develop
Commit: 15d307e71f0b43765536ab07b23f0ba2434a46a3
Parents: 2e8c2c4
Author: Romain Manni-Bucau <rm...@apache.org>
Authored: Wed Nov 5 08:59:45 2014 +0000
Committer: Romain Manni-Bucau <rm...@apache.org>
Committed: Wed Nov 5 08:59:45 2014 +0000
----------------------------------------------------------------------
.../java/org/apache/openejb/assembler/classic/JndiBuilder.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/15d307e7/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 13b2ae9..a8cd0fe 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,10 @@ 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();