axis-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r1004960 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment: DeploymentEngine.java scheduler/Scheduler.java scheduler/SchedulerTask.java
Date Wed, 06 Oct 2010 10:04:15 GMT
Author: azeez
Date: Wed Oct  6 10:04:15 2010
New Revision: 1004960

URL: http://svn.apache.org/viewvc?rev=1004960&view=rev
Log:
Fixing bug: CCE since we are setting a String and trying to retrieve it as a Boolean

Modified:
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/Scheduler.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/SchedulerTask.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=1004960&r1=1004959&r2=1004960&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
Wed Oct  6 10:04:15 2010
@@ -83,6 +83,7 @@ public abstract class DeploymentEngine i
     //to keep the web resource location if any
     protected static String webLocationString = null;
     protected Scheduler scheduler;
+    private SchedulerTask schedulerTask;
 
     public static void setWebLocationString(String webLocationString) {
         DeploymentEngine.webLocationString = webLocationString;
@@ -875,7 +876,8 @@ public abstract class DeploymentEngine i
     protected void startSearch(RepositoryListener listener) {
         scheduler = new Scheduler();
 
-        scheduler.schedule(new SchedulerTask(listener, configContext), new DeploymentIterator());
+        schedulerTask = new SchedulerTask(listener, configContext);
+        scheduler.schedule(schedulerTask, new DeploymentIterator());
     }
 
     /**
@@ -1382,7 +1384,7 @@ public abstract class DeploymentEngine i
             ((JarFileClassLoader) axisConfig.getSystemClassLoader()).destroy();
         }
         if (scheduler != null) {
-            scheduler.cleanup();
+            scheduler.cleanup(schedulerTask);
         }
         for (Map<String, Deployer> stringDeployerMap : deployerMap.values()) {
             for (Deployer deployer : stringDeployerMap.values()) {

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/Scheduler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/Scheduler.java?rev=1004960&r1=1004959&r2=1004960&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/Scheduler.java
(original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/Scheduler.java
Wed Oct  6 10:04:15 2010
@@ -20,13 +20,13 @@
 
 package org.apache.axis2.deployment.scheduler;
 
+import org.apache.axis2.java.security.AccessController;
+
 import java.security.PrivilegedAction;
 import java.util.Date;
 import java.util.Timer;
 import java.util.TimerTask;
 
-import org.apache.axis2.java.security.AccessController;
-
 public class Scheduler {
     private final Timer timer = (Timer)AccessController.doPrivileged(new PrivilegedAction()
{
         public Object run() {
@@ -73,8 +73,11 @@ public class Scheduler {
         }
     }
 
-    public void cleanup(){
-        timer.cancel();
+    public void cleanup(SchedulerTask schedulerTask){
+        synchronized (schedulerTask.lock) {
+            schedulerTask.state = SchedulerTask.CANCELLED;
+            timer.cancel();
+        }
     }
 
     public class SchedulerTimerTask extends TimerTask {

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/SchedulerTask.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/SchedulerTask.java?rev=1004960&r1=1004959&r2=1004960&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/SchedulerTask.java
(original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/scheduler/SchedulerTask.java
Wed Oct  6 10:04:15 2010
@@ -74,7 +74,8 @@ public class SchedulerTask implements Ru
     public void run() {
         synchronized (configCtx) {
             try {
-                configCtx.setNonReplicableProperty(DeploymentEngine.DEPLOYMENT_TASK_RUNNING,
"true");
+                configCtx.setNonReplicableProperty(DeploymentEngine.DEPLOYMENT_TASK_RUNNING,
+                                                   Boolean.TRUE);
                 checkRepository();
             } finally {
                 configCtx.removePropertyNonReplicable(DeploymentEngine.DEPLOYMENT_TASK_RUNNING);



Mime
View raw message