Title: [784] branches/servicemix-2.0/trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java: SM-173 : Quartz component can not be stopped and restarted
- Revision
- 784
- Author
- gnt
- Date
- 2005-11-10 20:12:45 -0500 (Thu, 10 Nov 2005)
Log Message
SM-173 : Quartz component can not be stopped and restarted
Modified Paths
Diff
Modified: branches/servicemix-2.0/trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java (783 => 784)
--- branches/servicemix-2.0/trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java 2005-11-11 01:11:50 UTC (rev 783)
+++ branches/servicemix-2.0/trunk/components/base/src/main/java/org/servicemix/components/quartz/QuartzComponent.java 2005-11-11 01:12:45 UTC (rev 784)
@@ -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) {