You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gary Larsen <ga...@envisn.com> on 2009/11/18 16:36:25 UTC
Help stopping cron job during tomcat shutdown
Thanks for any help with this.
I'm currently running version 2.1.7. I've been unable to get a running
Cron job to be interrupted after the Tomcat shutdown has been initiated. I
can see from the cocoon.log that the QuartzScheduler is catching the
interruption after the <shutdown-wait-time-ms>:
INFO [Thread-38] cron 2009-11-18 10:16:01,013 - Executing cron job named
'com.envisn.nv.sync.SynchronizerDaemon'
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role
[org.apache.excalibur.xml.xslt.XSLTProcessor/saxon]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role [org.apache.excalibur.store.StoreJanitor]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role
[org.apache.avalon.excalibur.logger.LoggerManager]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role [org.apache.excalibur.xml.xpath.XPathProcessor]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role [org.apache.cocoon.components.flow.Interpreter]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role
[org.apache.cocoon.components.thread.RunnableManager]
WARN [main] core.runnable.anon-25559255 2009-11-18 10:16:14,701 - running
commands have not terminated within 4000ms. Will shut them down by
interruption
INFO [Thread-1] quartz.core.QuartzScheduler 2009-11-18 10:16:51,344 -
Scheduler exist_QuartzScheduler_$_NON_CLUSTERED shutting down.
INFO [Thread-1] quartz.core.QuartzScheduler 2009-11-18 10:16:51,344 -
Scheduler exist_QuartzScheduler_$_NON_CLUSTERED paused.
INFO [Thread-1] quartz.core.QuartzScheduler 2009-11-18 10:16:51,344 -
Scheduler exist_QuartzScheduler_$_NON_CLUSTERED shutdown complete.
I have a Thread.interrupted() in the running job (SynchronizerDeamon) but
it's always false.
I think I need to add the job (or the target of the job) to the
DefaultThreadPool so that it is notified when the interuptAll() is called.
Am I on the right track? What am I missing here?
Thanks again,
gary
RE: Help stopping cron job during tomcat shutdown
Posted by Gary Larsen <ga...@envisn.com>.
More info:
I'm adding the job from Java:
JobScheduler scheduler = (JobScheduler)
this.manager.lookup(JobScheduler.ROLE);
SynchronizerDaemon daemon = createSynchronizerDaemon(context,
this.manager);
scheduler.addJob(jobName,
daemon,
schedExpr.toString(),
false);
_____
From: Gary Larsen [mailto:gary.larsen@envisn.com]
Sent: Wednesday, November 18, 2009 10:36 AM
To: users@cocoon.apache.org
Subject: Help stopping cron job during tomcat shutdown
Thanks for any help with this.
I'm currently running version 2.1.7. I've been unable to get a running
Cron job to be interrupted after the Tomcat shutdown has been initiated. I
can see from the cocoon.log that the QuartzScheduler is catching the
interruption after the <shutdown-wait-time-ms>:
INFO [Thread-38] cron 2009-11-18 10:16:01,013 - Executing cron job named
'com.envisn.nv.sync.SynchronizerDaemon'
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role
[org.apache.excalibur.xml.xslt.XSLTProcessor/saxon]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role [org.apache.excalibur.store.StoreJanitor]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role
[org.apache.avalon.excalibur.logger.LoggerManager]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role [org.apache.excalibur.xml.xpath.XPathProcessor]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role [org.apache.cocoon.components.flow.Interpreter]
WARN [main] core.manager 2009-11-18 10:16:10,701 - disposing of handler for
unreleased component. role
[org.apache.cocoon.components.thread.RunnableManager]
WARN [main] core.runnable.anon-25559255 2009-11-18 10:16:14,701 - running
commands have not terminated within 4000ms. Will shut them down by
interruption
INFO [Thread-1] quartz.core.QuartzScheduler 2009-11-18 10:16:51,344 -
Scheduler exist_QuartzScheduler_$_NON_CLUSTERED shutting down.
INFO [Thread-1] quartz.core.QuartzScheduler 2009-11-18 10:16:51,344 -
Scheduler exist_QuartzScheduler_$_NON_CLUSTERED paused.
INFO [Thread-1] quartz.core.QuartzScheduler 2009-11-18 10:16:51,344 -
Scheduler exist_QuartzScheduler_$_NON_CLUSTERED shutdown complete.
I have a Thread.interrupted() in the running job (SynchronizerDeamon) but
it's always false.
I think I need to add the job (or the target of the job) to the
DefaultThreadPool so that it is notified when the interuptAll() is called.
Am I on the right track? What am I missing here?
Thanks again,
gary