tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r920264 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
Date Mon, 08 Mar 2010 10:52:34 GMT
Author: jlmonteiro
Date: Mon Mar  8 10:52:33 2010
New Revision: 920264

URL: http://svn.apache.org/viewvc?rev=920264&view=rev
Log:
OPENEJB-1240: add @WebServiceRef support to @LocalClient. Actually; @LocalClient/@RemoteClient/App
Client share the same JNDI namespace so the trick is not to set the client flag (of the JndiEncBuilder)
if there is no remote classes and at least one local client class.

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=920264&r1=920263&r2=920264&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
Mon Mar  8 10:52:33 2010
@@ -606,13 +606,19 @@
 
             // App Client
             for (ClientInfo clientInfo : appInfo.clients) {
-                // determind the injections
+                // determine the injections
                 InjectionBuilder injectionBuilder = new InjectionBuilder(classLoader);
                 List<Injection> injections = injectionBuilder.buildInjections(clientInfo.jndiEnc);
 
                 // build the enc
                 JndiEncBuilder jndiEncBuilder = new JndiEncBuilder(clientInfo.jndiEnc, injections,
"Bean", clientInfo.moduleId, classLoader);
-                jndiEncBuilder.setClient(true);
+                // if there is at least a remote client classes
+                // or if there is no local client classes
+                // then, we can set the client flag
+                if ((clientInfo.remoteClients.size() > 0) || (clientInfo.localClients.size()
== 0)) {
+                    jndiEncBuilder.setClient(true);
+
+                }
                 jndiEncBuilder.setUseCrossClassLoaderRef(false);
                 Context context = (Context) jndiEncBuilder.build().lookup("comp/env");
 



Mime
View raw message