Author: ruwan
Date: Sun Feb 14 07:23:13 2010
New Revision: 909981

URL: http://svn.apache.org/viewvc?rev=909981&view=rev
Log:
synchronizing the deploy and unDeploy methods with the respective deployment 
file holders, otherwise if a new deployment has been detected while the 
deployment is inplace the deployment engine gets caught into a CME

Modified:
    
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=909981&r1=909980&r2=909981&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
 Sun Feb 14 07:23:13 2010
@@ -99,6 +99,8 @@
      */
     protected List wsToDeploy = new ArrayList();
 
+    private Object deploymentLock = new Object();
+
     /**
      * Stores all the web Services to undeploy.
      */
@@ -780,18 +782,18 @@
     /**
      * @param file ArchiveFileData
      */
-    public void addWSToDeploy(DeploymentFileData file) {
+    public synchronized void addWSToDeploy(DeploymentFileData file) {
         wsToDeploy.add(file);
     }
 
     /**
      * @param file WSInfo
      */
-    public void addWSToUndeploy(WSInfo file) {
+    public synchronized void addWSToUndeploy(WSInfo file) {
         wsToUnDeploy.add(file);
     }
 
-    public void doDeploy() {
+    public synchronized void doDeploy() {
         try {
             if (wsToDeploy.size() > 0) {
                 for (Object aWsToDeploy : wsToDeploy) {
@@ -864,7 +866,7 @@
         scheduler.schedule(new SchedulerTask(listener), new 
DeploymentIterator());
     }
 
-    public void unDeploy() {
+    public synchronized void unDeploy() {
         try {
             if (wsToUnDeploy.size() > 0) {
                 for (Object aWsToUnDeploy : wsToUnDeploy) {


Reply via email to