axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r407895 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: client/ServiceClient.java description/AxisServiceGroup.java engine/AxisConfiguration.java
Date Fri, 19 May 2006 19:55:04 GMT
Author: deepal
Date: Fri May 19 12:55:03 2006
New Revision: 407895

URL: http://svn.apache.org/viewvc?rev=407895&view=rev
Log:
-no need to notify axis observers when adding client side services 
- AxisServiceGroup has a flag to check whether client side or server side 

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=407895&r1=407894&r2=407895&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
Fri May 19 12:55:03 2006
@@ -98,8 +98,10 @@
                     "twoservicecannothavesamename",
                     this.axisService.getName()));
         }
+        AxisServiceGroup axisServiceGroup = (AxisServiceGroup) this.axisService.getParent();
+        axisServiceGroup.setClientSide(true);
         ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
-                (AxisServiceGroup) this.axisService.getParent());
+                axisServiceGroup);
         this.serviceContext = sgc.getServiceContext(this.axisService);
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java?rev=407895&r1=407894&r2=407895&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
Fri May 19 12:55:03 2006
@@ -23,8 +23,6 @@
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.modules.Module;
 import org.apache.axis2.util.Utils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
@@ -33,8 +31,6 @@
 
 public class AxisServiceGroup extends AxisDescription {
 
-    private static final Log log = LogFactory.getLog(AxisServiceGroup.class);
-
     // to store module ref at deploy time parsing
     private ArrayList modulesList = new ArrayList();
 
@@ -50,6 +46,9 @@
     // to keep name of the service group
     private String serviceGroupName;
 
+    //To check whether server side service or client side service
+    private boolean clientSide = false;
+
     /**
      * Field services
      */
@@ -122,7 +121,7 @@
 
     public void engageModule(AxisModule module) throws AxisFault {
         QName moduleName = module.getName();
-        boolean isEngagable ;
+        boolean isEngagable;
         for (Iterator iterator = engagedModules.iterator(); iterator.hasNext();) {
             QName modu = (QName) iterator.next();
             isEngagable = Utils.checkVersion(moduleName, modu);
@@ -213,5 +212,13 @@
             }
         }
         return false;
+    }
+
+    public boolean isClientSide() {
+        return clientSide;
+    }
+
+    public void setClientSide(boolean clientSide) {
+        this.clientSide = clientSide;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=407895&r1=407894&r2=407895&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
Fri May 19 12:55:03 2006
@@ -228,7 +228,9 @@
         while (services.hasNext()) {
             description = (AxisService) services.next();
             allservices.put(description.getName(), description);
-            notifyObservers(AxisEvent.SERVICE_DEPLOY, description);
+            if (!axisServiceGroup.isClientSide()) {
+                notifyObservers(AxisEvent.SERVICE_DEPLOY, description);
+            }
         }
 //        serviceGroups.put(axisServiceGroup.getServiceGroupName(), axisServiceGroup);
         addChild(axisServiceGroup);
@@ -244,7 +246,9 @@
         while (services.hasNext()) {
             AxisService axisService = (AxisService) services.next();
             allservices.remove(axisService.getName());
-            notifyObservers(AxisEvent.SERVICE_REMOVE, axisService);
+            if (!axisServiceGroup.isClientSide()) {
+                notifyObservers(AxisEvent.SERVICE_REMOVE, axisService);
+            }
         }
         removeChild(serviceGroupName);
     }
@@ -369,7 +373,10 @@
             AxisObserver axisObserver = (AxisObserver) observersList.get(i);
 
             try {
-                axisObserver.serviceUpdate(event, service);
+                AxisServiceGroup parent = (AxisServiceGroup) service.getParent();
+                if (!parent.isClientSide()) {
+                    axisObserver.serviceUpdate(event, service);
+                }
             } catch (Throwable e) {
                 //No need to stop the system due to this , So log and ignore
                 log.debug(e);



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


Mime
View raw message