axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r815299 - /webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/state/commands/UpdateServiceStateCommand.java
Date Tue, 15 Sep 2009 12:37:49 GMT
Author: azeez
Date: Tue Sep 15 12:37:49 2009
New Revision: 815299

URL: http://svn.apache.org/viewvc?rev=815299&view=rev
Log:
check axis2 service availability

Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/state/commands/UpdateServiceStateCommand.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/state/commands/UpdateServiceStateCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/state/commands/UpdateServiceStateCommand.java?rev=815299&r1=815298&r2=815299&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/state/commands/UpdateServiceStateCommand.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/state/commands/UpdateServiceStateCommand.java
Tue Sep 15 12:37:49 2009
@@ -31,7 +31,7 @@
 import org.apache.commons.logging.LogFactory;
 
 /**
- * 
+ *
  */
 public class UpdateServiceStateCommand extends UpdateStateCommand {
 
@@ -63,6 +63,7 @@
             try {
                 AxisService axisService =
                         configurationContext.getAxisConfiguration().getService(serviceName);
+                validateAxisService(axisService);
                 ServiceContext serviceContext = sgCtx.getServiceContext(axisService);
                 propertyUpdater.updateProperties(serviceContext);
             } catch (AxisFault e) {
@@ -76,6 +77,7 @@
             } catch (AxisFault axisFault) {
                 throw new ClusteringFault(axisFault);
             }
+            validateAxisService(axisService);
             String scope = axisService.getScope();
             if (sgCtx == null) {
                 AxisServiceGroup serviceGroup =
@@ -102,6 +104,14 @@
         }
     }
 
+    private void validateAxisService(AxisService axisService) throws ClusteringFault {
+        if (axisService == null){
+            String msg = "Service " + serviceName + " not found";
+            log.error(msg);
+            throw new ClusteringFault(msg);
+        }
+    }
+
     public String toString() {
         return "UpdateServiceStateCommand";
     }



Mime
View raw message