geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r506311 - /geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
Date Mon, 12 Feb 2007 06:09:06 GMT
Author: dims
Date: Sun Feb 11 22:09:05 2007
New Revision: 506311

URL: http://svn.apache.org/viewvc?view=rev&rev=506311
Log:
Fix for GERONIMO-2821 - SwitchingServiceRefBuilder environment fix (take 2)

Modified:
    geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java?view=diff&rev=506311&r1=506310&r2=506311
==============================================================================
--- geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
Sun Feb 11 22:09:05 2007
@@ -66,41 +66,12 @@
                                  XmlObject plan,
                                  Environment environment)
             throws DeploymentException {
-        // Since we don't have a classloader at this point do simple string-based
-        // check for Service classes, and if it does not match either merge
-        // both environments
-        
-        boolean mergedJAXRPCEnv = false;
-        boolean mergedJAXWSEnv = false;
-        
-        XmlObject[] serviceRefs = specDD.selectChildren(serviceRefQNameSet);
-        for (XmlObject serviceRef : serviceRefs) {
-            ServiceRefType serviceRefType = 
-                (ServiceRefType) convert(serviceRef, JEE_CONVERTER, ServiceRefType.type);
-            String serviceInterfaceName = getStringValue(serviceRefType.getServiceInterface());
-            if ("javax.xml.rpc.Service".equals(serviceInterfaceName)) {
-                if (!mergedJAXRPCEnv) {
-                    mergeEnvironment(environment, getJAXRCPBuilder());
-                    mergedJAXRPCEnv = true;
-                }
-            } else if ("javax.xml.ws.Service".equals(serviceInterfaceName)) {
-                if (!mergedJAXWSEnv) {
-                    mergeEnvironment(environment, getJAXWSBuilder());
-                    mergedJAXWSEnv = true;
-                }
-            } else {
-                // does not match either Service class, merge both environments
-                if (!mergedJAXRPCEnv) {
-                    mergeEnvironment(environment, getJAXRCPBuilder());
-                    mergedJAXRPCEnv = true;
-                }
-                if (!mergedJAXWSEnv) {
-                    mergeEnvironment(environment, getJAXWSBuilder());
-                    mergedJAXWSEnv = true;
-                }
-                break;
-            }                    
-        }        
+        if (this.jaxrpcBuilders != null && !this.jaxrpcBuilders.isEmpty()) {
+            mergeEnvironment(environment, getJAXRCPBuilder());
+        }
+        if (this.jaxwsBuilders != null && !this.jaxwsBuilders.isEmpty()) {
+            mergeEnvironment(environment, getJAXWSBuilder());
+        }
     }
 
     public void buildNaming(XmlObject specDD,



Mime
View raw message