<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Quartz with cluster and JobExecutionException"]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/17.page</link>
		<description><![CDATA[Latest messages posted in the topic "Quartz with cluster and JobExecutionException"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ We run quartz 1.8.4 in a cluster with following quartzProperties:

            <prop key="org.quartz.jobStore.misfireThreshold">60000</prop>
            <prop key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX</prop>
            <prop key="org.quartz.jobStore.isClustered">true</prop>
            <prop key="org.quartz.jobStore.clusterCheckinInterval">20000</prop>  

We have 2 nodes in cluster (Node 1 and Node 2)

We have trigger that each 30 seconds execute the same job on one of the nodes.
The quartz performs random distribution of jobs between 2 nodes and it is OK.

Here is use case:

1)	Node 2 is down.
2)	Jobs is triggered on Node 1 for several time
3)	We start Node 1 and immediately it receive trigger to execute job….

We would like to avoid this for first 60 minutes.
We would like that job will be triggered on Node 1 first.

So, when executeInternal is called on ‘Node 2’ we fire exception with flag refireImmediately = true

throw new JobExecutionException(true);

Question:

Can we expect that after one node call “throw new JobExecutionException()” the next time quartz will trigger job on another node or it still randomly?
What is another option to cause Quartz to select Node as we prefer?
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34324</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34324</link>
				<pubDate><![CDATA[Tue, 27 Mar 2012 07:19:14]]> GMT</pubDate>
				<author><![CDATA[ anatolyg]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ 
The refire immediately flag *only* causes an immediate new call to execute() method on the same node.

Targeting of nodes (per trigger) can be achieved with Quartz Where features of Terracotta Clustered Quartz.
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34326</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34326</link>
				<pubDate><![CDATA[Tue, 27 Mar 2012 09:14:47]]> GMT</pubDate>
				<author><![CDATA[ jhouse]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ You mean Terracotta commercial versions. 
I see.

And what about not comercial version.

Is it any option to avoid load balancing in cluster mode?
I want to reach Active/Pasive mode of cluster.
I would like the same node will always take all jobs till node is not down and only when down another node will take jobs. 

May be latest version of Quartz allow such functionality?

Thanks.

]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34329</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34329</link>
				<pubDate><![CDATA[Tue, 27 Mar 2012 10:10:13]]> GMT</pubDate>
				<author><![CDATA[ anatolyg]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ No, there is not currently a "passive" mode, only active-active.

Probably wouldn't be too hard to add to JDBC JobStore, if someone had the time and inclination.
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34331</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34331</link>
				<pubDate><![CDATA[Tue, 27 Mar 2012 13:28:18]]> GMT</pubDate>
				<author><![CDATA[ jhouse]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ So, when executeInternal is called on ‘Node 2’ and we fire exception with flag refireImmediately = false, like throw new JobExecutionException(); 

Does it mean that next time job will be trigered on this 'Node 2' or randomally on any Node?
(To clarify if it is any difference if executeInternal just return or throw new JobExecutionException(false)) 

2. Active/Active supported. 
   Active-Pasive NOT supported.
   Is it any way to reach 100% round-robin or it is only Randomly behaviour?

Thanks

]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34341</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34341</link>
				<pubDate><![CDATA[Tue, 27 Mar 2012 23:40:20]]> GMT</pubDate>
				<author><![CDATA[ anatolyg]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ 
1-  Refire via the refireImmediately flag will ALWAYS happen on the same node

2- Round-robin is not supported.   Something very near approaching round-robin is supported by Quartz Where (commercial).
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34350</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34350</link>
				<pubDate><![CDATA[Wed, 28 Mar 2012 06:55:58]]> GMT</pubDate>
				<author><![CDATA[ jhouse]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ To clarify if it is any difference if executeInternal just return or throw new JobExecutionException(false).


1) If executeInternal just return than next time job will be trigered randomally on one of nodes.

2) If executeInternal throw new JobExecutionException()
with refireImmediately = true OR refireImmediately = false
then next time job will be trigered on the same node.  




]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34354</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34354</link>
				<pubDate><![CDATA[Wed, 28 Mar 2012 08:24:54]]> GMT</pubDate>
				<author><![CDATA[ anatolyg]]></author>
			</item>
			<item>
				<title>Re:Quartz with cluster and JobExecutionException</title>
				<description><![CDATA[ 
If you throw an exception with refireImmediately == false, then the next scheduled firing of that trigger will happen on any random node.
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6835.page#34359</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6835.page#34359</link>
				<pubDate><![CDATA[Wed, 28 Mar 2012 12:17:03]]> GMT</pubDate>
				<author><![CDATA[ jhouse]]></author>
			</item>
	</channel>
</rss>