<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "getTriggersOfJob() reports wrong fire time when using TerracottaJobStore"]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/17.page</link>
		<description><![CDATA[Latest messages posted in the topic "getTriggersOfJob() reports wrong fire time when using TerracottaJobStore"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ Hi,

I'm currently evaluating Quartz coupled with the Terracotta Job store so it can be used across a cluster. I have knocked up a small webapp that will let you view jobs and their triggers. The problem I am having is that when I get the Trigger back for the Job, the previousFireTime and nextFireTime values are not the same for all schedulers in the cluster. The docs do not mention these methods being cluster-unaware, and a quick look at the source code suggests that the Trigger is retrieved straight from the JobStore.

Having a look in the Terracotta dev console shows that the Triggers are serialised when they are put into the JobStore. Could this be anything to do with it?

FYI, my quartz.properties is as follows:
<span class="genmed"><b>Code:</b></span><br>
		<div>
		<pre bbCodeId="pre-code" style="overflow: auto; width: 95%; max-height: 350px; height:expression(this.scrollHeight > 350 ? '350px' : 'auto');">
org.quartz.scheduler.instanceName = MyScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 3

org.quartz.jobStore.class = org.terracotta.quartz.TerracottaJobStore

org.quartz.jobStore.tcConfigUrl = localhost:9510

#===================================================
# Configure the Job Initialization Plugin
#===================================================

org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
org.quartz.plugin.jobInitializer.fileNames = META-INF/jobs.xml
org.quartz.plugin.jobInitializer.failOnFileNotFound = true
org.quartz.plugin.jobInitializer.wrapInUserTransaction = false
</pre>
		</div>

Cheers
Ciaran
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#18369</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#18369</link>
				<pubDate><![CDATA[Mon, 8 Mar 2010 08:01:23]]> GMT</pubDate>
				<author><![CDATA[ ciaranw]]></author>
			</item>
			<item>
				<title>Re:getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ That is an interesting question that I don't immediately know the answer to. 

I could believe that the serialization is to blame for being able to observe the trigger fields in a stale state. We only force the local trigger state to be deserialized when the scheduler is actually acquiring the trigger. 

Sounds like we might need to do that if triggers are looked up for some other means.

One thing to note is that there were some serious bugs in the terracotta job store before the 3.2.1 release. If you haven't already got the new version I recommend getting it before doing any more testing. 

Any chance you could put together a sample and the steps to run it to reproduce this problem?]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#18543</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#18543</link>
				<pubDate><![CDATA[Fri, 12 Mar 2010 14:08:33]]> GMT</pubDate>
				<author><![CDATA[ teck]]></author>
			</item>
			<item>
				<title>Re:getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ Hi,
Sorry for the late reply, been very busy! I have put together a simple app that has two jobs scheduled that execute every 10 secs. All they do is log to the console. The webapp also contains a jsp that displays the last fired time and next fire time of the trigger for each job. 

The project uses maven, run it with mvn tc:run and it will boot up all the terracotta stuff and two instances of jetty. Go to http://localhost:8080/scheduler/index and http://localhost:8081/scheduler/index and you'll see that the times are not in sync.

Cheers
Ciaran]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#19157</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#19157</link>
				<pubDate><![CDATA[Tue, 6 Apr 2010 03:31:51]]> GMT</pubDate>
				<author><![CDATA[ ciaranw]]></author>
			</item>
			<item>
				<title>Re:getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ How about your tc-config.xml?
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#19166</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#19166</link>
				<pubDate><![CDATA[Tue, 6 Apr 2010 09:53:18]]> GMT</pubDate>
				<author><![CDATA[ gkeim]]></author>
			</item>
			<item>
				<title>Re:getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ <p></p>

		<cite>gkeim wrote:</cite><br>
		<blockquote>How about your tc-config.xml?
&nbsp;
		</blockquote>

Not much different than a standard tc-config.xml:
<span class="genmed"><b>Code:</b></span><br>
		<div>
		<pre bbCodeId="pre-code" style="overflow: auto; width: 95%; max-height: 350px; height:expression(this.scrollHeight > 350 ? '350px' : 'auto');">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!-- All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. --&gt;
&lt;!-- This Terracotta configuration file is intended for use with 
 Terracotta for Hibernate. --&gt;
&lt;tc:tc-config xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-5.xsd" 
xmlns:tc="http://www.terracotta.org/config" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  
  &lt;servers&gt;
    &lt;!-- Shows where the Terracotta server can be found. --&gt;
    &lt;server host="localhost"&gt;
      &lt;data&gt;%&#40;user.home&#41;/terracotta/server-data&lt;/data&gt;
      &lt;logs&gt;%&#40;user.home&#41;/terracotta/server-logs&lt;/logs&gt;
    &lt;/server&gt;
  &lt;/servers&gt;
  &lt;!-- Shows where to put the generated client logs --&gt;  
  &lt;clients&gt;
    &lt;logs&gt;%&#40;user.home&#41;/terracotta/client-logs&lt;/logs&gt;
    
  &lt;!-- Names the Terracotta Integration Modules &#40;TIM&#41; needed for
       clustering specific technologies. --&gt;
    &lt;modules&gt;
      &lt;module name="tim-quartz-1.7" version="1.3.1" /&gt;
	  &lt;module name="tim-jetty-6.1" version="2.1.1" /&gt;
    &lt;/modules&gt;
  &lt;/clients&gt;
&lt;/tc:tc-config&gt;
</pre>
		</div>

Ciaran
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#19167</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#19167</link>
				<pubDate><![CDATA[Tue, 6 Apr 2010 09:56:56]]> GMT</pubDate>
				<author><![CDATA[ ciaranw]]></author>
			</item>
			<item>
				<title>Re:getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ Has any progress been made on this issue? I could not find an open or closed bug in Jira related to this issue.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#24740</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#24740</link>
				<pubDate><![CDATA[Sat, 29 Jan 2011 13:21:24]]> GMT</pubDate>
				<author><![CDATA[ jayhogan]]></author>
			</item>
			<item>
				<title>Re:getTriggersOfJob() reports wrong fire time when using TerracottaJobStore</title>
				<description><![CDATA[ <p></p>

		<cite>jayhogan wrote:</cite><br>
		<blockquote>Has any progress been made on this issue? I could not find an open or closed bug in Jira related to this issue.&nbsp;
		</blockquote>

Hi,

It looks like it was fixed in the 3.2.1_2 release of terracotta, although I could not find any JIRA issues related to it. Upgrading to that version of terracotta (and related quartz, which i think was 1.8.1?) seemed to fix my problem. 

Ciaran]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3248.page#24949</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3248.page#24949</link>
				<pubDate><![CDATA[Mon, 7 Feb 2011 03:23:37]]> GMT</pubDate>
				<author><![CDATA[ ciaranw]]></author>
			</item>
	</channel>
</rss>