axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r467618 - in /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2: deployment/DeploymentEngine.java deployment/ServiceGroupBuilder.java deployment/repository/util/WSInfoList.java engine/AxisConfiguration.java
Date Wed, 25 Oct 2006 12:09:29 GMT
Author: deepal
Date: Wed Oct 25 05:09:28 2006
New Revision: 467618

URL: http://svn.apache.org/viewvc?view=rev&rev=467618
Log:
fixing AXIS2-1295 , AXIS2-1331

Modified:
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=467618&r1=467617&r2=467618
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
Wed Oct 25 05:09:28 2006
@@ -690,10 +690,19 @@
                 for (int i = 0; i < wsToUnDeploy.size(); i++) {
                     WSInfo wsInfo = (WSInfo) wsToUnDeploy.get(i);
                     if (wsInfo.getType() == TYPE_SERVICE) {
-                        fileName = getAxisServiceName(wsInfo.getFileName());
-                        axisConfig.removeServiceGroup(fileName);
-                        log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
-                                wsInfo.getFileName()));
+                        if (isHotUpdate()) {
+                            try {
+                                fileName = getAxisServiceName(wsInfo.getFileName());
+                                axisConfig.removeServiceGroup(fileName);
+                                log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
+                                        wsInfo.getFileName()));
+                            } catch (AxisFault axisFault) {
+                                //May be a faulty service
+                                axisConfig.removeFaultyService(wsInfo.getFileName());
+                            }
+                        } else {
+                            axisConfig.removeFaultyService(wsInfo.getFileName());
+                        }
                     }
                 }
             }

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/ServiceGroupBuilder.java?view=diff&rev=467618&r1=467617&r2=467618
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
Wed Oct 25 05:09:28 2006
@@ -70,9 +70,13 @@
             while (serviceitr.hasNext()) {
                 OMElement service = (OMElement) serviceitr.next();
                 OMAttribute serviceNameatt = service.getAttribute(new QName(ATTRIBUTE_NAME));
+                if (serviceNameatt == null) {
+                    throw new DeploymentException(
+                            Messages.getMessage(DeploymentErrorMsgs.SERVICE_NAME_ERROR));
+                }
                 String serviceName = serviceNameatt.getAttributeValue();
 
-                if (serviceName == null) {
+                if (serviceName == null || "".equals(serviceName)) {
                     throw new DeploymentException(
                             Messages.getMessage(DeploymentErrorMsgs.SERVICE_NAME_ERROR));
                 } else {

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java?view=diff&rev=467618&r1=467617&r2=467618
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
Wed Oct 25 05:09:28 2006
@@ -192,11 +192,7 @@
     public void update() {
         synchronized (deployer) {
             checkForUndeployedServices();
-
-            if (deployer.isHotUpdate()) {
-                deployer.unDeploy();
-            }
-
+            deployer.unDeploy();
             deployer.doDeploy();
         }
     }

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?view=diff&rev=467618&r1=467617&r2=467618
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
Wed Oct 25 05:09:28 2006
@@ -57,7 +57,9 @@
 
     private final HashMap policySupportedModules = new HashMap();
 
-    /** Stores the QNames of local policy assertions */
+    /**
+     * Stores the QNames of local policy assertions
+     */
     private final ArrayList localPolicyAssertions = new ArrayList();
 
     // to store AxisObserver Objects
@@ -511,6 +513,17 @@
         return faultyServices;
     }
 
+    public void removeFaultyService(String key) {
+        Iterator itr = faultyServices.keySet().iterator();
+        while (itr.hasNext()) {
+            String fullFileName = (String) itr.next();
+            if (fullFileName.indexOf(key) > 0) {
+                faultyServices.remove(fullFileName);
+                return;
+            }
+        }
+    }
+
     // to get the out flow correpodning to the global out flow;
     public ArrayList getGlobalOutPhases() {
         return this.outPhases;
@@ -849,15 +862,16 @@
      * TargetResolvers, calling each one in turn when
      * resolveTarget is called
      */
-    public TargetResolver getTargetResolverChain(){
-        return new TargetResolver(){
+    public TargetResolver getTargetResolverChain() {
+        return new TargetResolver() {
             public void resolveTarget(MessageContext messageContext) {
                 Iterator iter = targetResolvers.iterator();
-                while(iter.hasNext()){
-                    TargetResolver tr = (TargetResolver)iter.next();
+                while (iter.hasNext()) {
+                    TargetResolver tr = (TargetResolver) iter.next();
                     tr.resolveTarget(messageContext);
                 }
-            }};
+            }
+        };
     }
 
     public void addTargetResolver(TargetResolver tr) {



---------------------------------------------------------------------
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