Quantcast

[mule-scm] [mule][25300] branches/mule-3.x/modules/launcher/src/main/java/org/mule/ module/launcher/MuleDeploymentService.java: Waiting for appDirMonitorTimer finalization on MuleDeploymentService#stop

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[mule-scm] [mule][25300] branches/mule-3.x/modules/launcher/src/main/java/org/mule/ module/launcher/MuleDeploymentService.java: Waiting for appDirMonitorTimer finalization on MuleDeploymentService#stop

pablo.kraan
[mule][25300] branches/mule-3.x/modules/launcher/src/main/java/org/mule/module/launcher/MuleDeploymentService.java: Waiting for appDirMonitorTimer finalization on MuleDeploymentService#stop
Revision
25300
Author
pablo.kraan
Date
2013-02-22 09:06:26 -0600 (Fri, 22 Feb 2013)

Log Message

Waiting for appDirMonitorTimer finalization on MuleDeploymentService#stop

Modified Paths

Diff

Modified: branches/mule-3.x/modules/launcher/src/main/java/org/mule/module/launcher/MuleDeploymentService.java (25299 => 25300)


--- branches/mule-3.x/modules/launcher/src/main/java/org/mule/module/launcher/MuleDeploymentService.java	2013-02-22 14:40:43 UTC (rev 25299)
+++ branches/mule-3.x/modules/launcher/src/main/java/org/mule/module/launcher/MuleDeploymentService.java	2013-02-22 15:06:26 UTC (rev 25300)
@@ -252,10 +252,7 @@
     @Override
     public void stop()
     {
-        if (appDirMonitorTimer != null)
-        {
-            appDirMonitorTimer.shutdownNow();
-        }
+        stopAppDirMonitorTimer();
 
         // tear down apps in reverse order
         Collections.reverse(applications);
@@ -274,6 +271,25 @@
 
     }
 
+    private void stopAppDirMonitorTimer()
+    {
+        if (appDirMonitorTimer != null)
+        {
+            appDirMonitorTimer.shutdown();
+            while (!appDirMonitorTimer.isTerminated())
+            {
+                try
+                {
+                    Thread.sleep(50);
+                }
+                catch (InterruptedException e)
+                {
+                    throw new RuntimeException(e);
+                }
+            }
+        }
+    }
+
     @Override
     public Application findApplication(String appName)
     {

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Loading...