You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by az...@apache.org on 2008/01/09 08:26:55 UTC

svn commit: r610287 - in /webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control: GetConfigurationCommand.java GetConfigurationResponseCommand.java

Author: azeez
Date: Tue Jan  8 23:26:53 2008
New Revision: 610287

URL: http://svn.apache.org/viewvc?rev=610287&view=rev
Log:
Handling client side services & service deployed from within modules - we need not send them across to a new member which joins the cluster since the service name will be different from node to node.

Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationResponseCommand.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationCommand.java?rev=610287&r1=610286&r2=610287&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationCommand.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationCommand.java Tue Jan  8 23:26:53 2008
@@ -17,6 +17,8 @@
 
 import org.apache.axis2.clustering.ClusteringFault;
 import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.engine.AxisConfiguration;
 
@@ -37,9 +39,20 @@
         AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
         for (Iterator iter = axisConfig.getServiceGroups(); iter.hasNext();) {
             AxisServiceGroup serviceGroup = (AxisServiceGroup) iter.next();
+            boolean excludeSG = false;
+            for (Iterator serviceIter = serviceGroup.getServices(); serviceIter.hasNext();) {
+                AxisService service = (AxisService) serviceIter.next();
+                if (service.getParameter(AxisModule.MODULE_SERVICE) != null ||
+                    service.isClientSide()) { // No need to send services deployed through modules or client side services
+                    excludeSG = true;
+                    break;
+                }
+            }
 
             //TODO: Exclude all services loaded from modules. How to handle data services etc.?
-            serviceGroupNames.add(serviceGroup.getServiceGroupName());
+            if (!excludeSG) {
+                serviceGroupNames.add(serviceGroup.getServiceGroupName());
+            }
         }
         this.serviceGroupNames =
                 (String[]) serviceGroupNames.toArray(new String[serviceGroupNames.size()]);

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationResponseCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationResponseCommand.java?rev=610287&r1=610286&r2=610287&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationResponseCommand.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetConfigurationResponseCommand.java Tue Jan  8 23:26:53 2008
@@ -64,7 +64,7 @@
                     }
                 }
 
-                //TODO: Check this code. Need to see what happens to Data Services etc. also services deployed from within modules
+                //TODO: We support only AAR files for now
 
                 // Unload all service groups which were not sent by the neighbour,
                 // but have been currently loaded
@@ -86,9 +86,9 @@
                              serviceIter.hasNext();) {
                             AxisService service = (AxisService) serviceIter.next();
                             if (service.isClientSide() ||
-                                service.getParameter(AxisModule.MODULE_SERVICE) != null) {
+                                service.getParameter(AxisModule.MODULE_SERVICE) != null) { // Do not unload service groups containing client side services or ones deployed from within modules
                                 mustUnloadServiceGroup = false;
-                                break; // Do not unload service groups containing client side services
+                                break;
                             }
                         }
                         if (mustUnloadServiceGroup) {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org