<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Messages posted by "zutai"]]></title>
		<link>http://forums.terracotta.org/forums/posts/listByUser/6361.page</link>
		<description><![CDATA[Messages posted by "zutai"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Re:Overlapping stateful job executions in a cluster</title>
				<description><![CDATA[ To be honest, I've tried both, it makes no difference.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/preList/6743/33924.page#33924</guid>
				<link>http://forums.terracotta.org/forums/posts/preList/6743/33924.page#33924</link>
				<pubDate><![CDATA[Mon, 5 Mar 2012 10:18:10]]> GMT</pubDate>
				<author><![CDATA[ zutai]]></author>
			</item>
			<item>
				<title>Overlapping stateful job executions in a cluster</title>
				<description><![CDATA[ Hi,

Here is my environment :
a tomcat cluster composed by 2 nodes, Quartz 2.1.3, cluster mode, using JobStoreTX with an oracle DB.

My test : 
I have a very simple <b>stateful</b> job which does : 
- print "start"
- wait for 90 seconds
- print "end"

I schedule it every 20 seconds using CRON (with <i>MisfireHandlingInstructionDoNothing </i>setting)

When both nodes are up, there's no problem, as the job is stateful, the scheduler waits until current job execution ends before firing a new one.
Cluster is working properly, some executions are on node A, some others on node B, no problem.

On the contrary, I've got a problem in this case : 
While job is being executed on Node A, I shutdown this node.
Node A waits for job to end before completing its shutdown.

The problem is between the moment when I call "shutdown" and the moment jobs ends, Node B starts another job execution !

Anyone can explain me what's happening ?


What we can see in log files : 

<b><i>NODE A : </b></i>
2012-03-05 11:25:35,170 [http-nio-/0.0.0.0-9380-exec-13] Scheduler BigSchedulerGlobal_$_cma11330943135100 started.
2012-03-05 11:26:20,032 [BigSchedulerGlobal_Worker-3] Quartz Test Job Start.
2012-03-05 11:27:50,029 [BigSchedulerGlobal_Worker-3] Quartz Test Job End.
<b>2012-03-05 11:27:50,083 [BigSchedulerGlobal_Worker-8] Quartz Test Job Start.</b>
2012-03-05 11:27:59,293 [stop children - Catalina:j2eeType=WebModule,name=//localhost/casino,J2EEApplication=none,J2EEServer=none] Scheduler BigSchedulerGlobal_$_cma11330943135100 shutting down.
2012-03-05 11:27:59,293 [stop children - Catalina:j2eeType=WebModule,name=//localhost/casino,J2EEApplication=none,J2EEServer=none] Scheduler BigSchedulerGlobal_$_cma11330943135100 paused.
2012-03-05 11:27:59,306 [stop children - Catalina:j2eeType=WebModule,name=//localhost/casino,J2EEApplication=none,J2EEServer=none] Scheduler BigSchedulerGlobal_$_cma11330943135100 shutdown complete.
<b><font color='red'>2012-03-05 11:29:20,079</font> [BigSchedulerGlobal_Worker-8] Quartz Test Job End.</b>


<b><i>NODE B:</b></i>
2012-03-05 11:25:37,282 [http-nio-/0.0.0.0-8380-exec-18] Scheduler BigSchedulerGlobal_$_cma11330943137232 started.
2012-03-05 11:28:14,829 [QuartzScheduler_BigSchedulerGlobal-cma11330943137232_ClusterManager] ClusterManager: detected 1 failed or restarted instances.
2012-03-05 11:28:14,829 [QuartzScheduler_BigSchedulerGlobal-cma11330943137232_ClusterManager] ClusterManager: Scanning for instance "cma11330943135100"'s failed in-progress jobs.
2012-03-05 11:28:14,982 [QuartzScheduler_BigSchedulerGlobal-cma11330943137232_ClusterManager] ClusterManager: ......Cleaned-up 1 other failed job(s).
<b><font color='red'>2012-03-05 11:28:20,022</font> [BigSchedulerGlobal_Worker-10] Quartz Test Job Start.</b>
<b>2012-03-05 11:29:27,905 [BigSchedulerGlobal_Worker-6] Quartz Test Job Start.</b>
2012-03-05 11:29:50,020 [BigSchedulerGlobal_Worker-10] Quartz Test Job End.
2012-03-05 11:30:20,021 [BigSchedulerGlobal_Worker-5] Quartz Test Job Start.
2012-03-05 11:30:57,901 [BigSchedulerGlobal_Worker-6] Quartz Test Job End.
2012-03-05 11:31:20,021 [BigSchedulerGlobal_Worker-3] Quartz Test Job Start.
2012-03-05 11:31:50,019 [BigSchedulerGlobal_Worker-5] Quartz Test Job End.
2012-03-05 11:32:20,031 [BigSchedulerGlobal_Worker-2] Quartz Test Job Start.
2012-03-05 11:32:50,024 [BigSchedulerGlobal_Worker-3] Quartz Test Job End.
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/preList/6743/33920.page#33920</guid>
				<link>http://forums.terracotta.org/forums/posts/preList/6743/33920.page#33920</link>
				<pubDate><![CDATA[Mon, 5 Mar 2012 08:28:47]]> GMT</pubDate>
				<author><![CDATA[ zutai]]></author>
			</item>
	</channel>
</rss>