Title: [783] trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java: SM-173 : Quartz component can not be stopped and restarted
Revision
783
Author
gnt
Date
2005-11-10 20:11:50 -0500 (Thu, 10 Nov 2005)

Log Message

SM-173 : Quartz component can not be stopped and restarted

Modified Paths


Diff

Modified: trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java (782 => 783)

--- trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java	2005-11-10 14:07:10 UTC (rev 782)
+++ trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java	2005-11-11 01:11:50 UTC (rev 783)
@@ -54,19 +54,29 @@
 
     public void start() throws JBIException {
         try {
-            scheduler.start();
-        }
-        catch (SchedulerException e) {
+            scheduler.resumeAll();
+            super.start();
+        } catch (SchedulerException e) {
             throw new JBIException(e);
         }
     }
 
     public void stop() throws JBIException {
         try {
+            super.stop();
+            scheduler.pauseAll();
+        } catch (SchedulerException e) {
+            throw new JBIException(e);
+        }
+    }
+
+    public void shutDown() throws JBIException {
+        try {
             scheduler.shutdown();
-        }
-        catch (SchedulerException e) {
+        } catch (SchedulerException e) {
             throw new JBIException(e);
+        } finally {
+            super.shutDown();
         }
     }
 
@@ -163,6 +173,8 @@
                     factory = new StdSchedulerFactory();
                 }
                 scheduler = factory.getScheduler();
+                scheduler.pauseAll();
+                scheduler.start();
             }
         }
         catch (SchedulerException e) {

Reply via email to