You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2011/07/25 13:29:32 UTC

svn commit: r1150634 - /openejb/branches/openejb-3.2.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java

Author: jlmonteiro
Date: Mon Jul 25 11:29:32 2011
New Revision: 1150634

URL: http://svn.apache.org/viewvc?rev=1150634&view=rev
Log:
Reverting David's commit regarding NameAlreadyBoundException. Looks like we only need to replace moduleId by uniqueId like we did for Validation stuff
--> the fix

Modified:
    openejb/branches/openejb-3.2.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java

Modified: openejb/branches/openejb-3.2.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.2.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=1150634&r1=1150633&r2=1150634&view=diff
==============================================================================
--- openejb/branches/openejb-3.2.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java (original)
+++ openejb/branches/openejb-3.2.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java Mon Jul 25 11:29:32 2011
@@ -670,24 +670,24 @@ public class Assembler extends Assembler
                 jndiEncBuilder.setUseCrossClassLoaderRef(false);
                 Context context = (Context) jndiEncBuilder.build().lookup("comp/env");
 
-                containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.moduleId + "/comp/env", context);
+                containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.uniqueId + "/comp/env", context);
                 if (clientInfo.codebase != null) {
-                    containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.moduleId + "/comp/path", clientInfo.codebase);
+                    containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.uniqueId + "/comp/path", clientInfo.codebase);
                 }
                 if (clientInfo.mainClass != null) {
-                    containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.moduleId + "/comp/mainClass", clientInfo.mainClass);
+                    containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.uniqueId + "/comp/mainClass", clientInfo.mainClass);
                 }
                 if (clientInfo.callbackHandler != null) {
-                    containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.moduleId + "/comp/callbackHandler", clientInfo.callbackHandler);
+                    containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.uniqueId + "/comp/callbackHandler", clientInfo.callbackHandler);
                 }
-                containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.moduleId + "/comp/injections", injections);
+                containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.uniqueId + "/comp/injections", injections);
 
                 for (String clientClassName : clientInfo.remoteClients) {
-                    containerSystem.getJNDIContext().bind("openejb/client/" + clientClassName, clientInfo.moduleId);
+                    containerSystem.getJNDIContext().bind("openejb/client/" + clientClassName, clientInfo.uniqueId);
                 }
                 
                 for (String clientClassName : clientInfo.localClients) {
-                    containerSystem.getJNDIContext().bind("openejb/client/" + clientClassName, clientInfo.moduleId);
+                    containerSystem.getJNDIContext().bind("openejb/client/" + clientClassName, clientInfo.uniqueId);
                     logger.getChildLogger("client").info("createApplication.createLocalClient", clientClassName, clientInfo.moduleId);
                 }
             }
@@ -909,7 +909,7 @@ public class Assembler extends Assembler
         // get the client ids
         List<String> clientIds = new ArrayList<String>();
         for (ClientInfo clientInfo : appInfo.clients) {
-            clientIds.add(clientInfo.moduleId);
+            clientIds.add(clientInfo.uniqueId);
             for (String className : clientInfo.localClients) {
                 clientIds.add(className);
             }