i can't seem to edit my previous posts?
anyway, i tried jboss-4.0.4CR2 i think it's working kinda like i expected. i can start a job by calling the slsb, which as i said, gets the timer service, and creates a timer. it'll be fun to see how easy it is to get 4.0.4CR2 on a production machine :).
the timer keeps running through server restarts and ejb deploys, which is good. during server restarts (and redeploys too), the timer's Info class seems to be getting reset to the initial values put into it by the slsb like so:
i have a TimedJobInfo class. This class contains two integers, a runCount, and a maxRuns. It also has a String for the jobId. It is created in the slsb's business method, and passed to the timer.
In the ejbTimeout method, the runCount is incremented and compared to the maxRuns (is there a better way to specify that the job should stop after X runs)?. runCount is initially set to 1, and i can watch it get incremented through each execution. When I redeply the ejb, the timer continues to execute, but the runCount is back to 1.
i suppose this is fine, as to me it's better to run the job more times than needed. the purpose of this job is to monitor a print job on another server by making a webservice request to get the status. if the print job has completed (success or fail) it posts xml to another server.
i'll end with some questions to hopefully get more info from the timedobject/timerservice folks.
1. should i expect 4.0.3 to persist my job through server restarts out of the box? if not can it be configured to do so?
2. is there a way to get the job's Info to re-persist it's state after each job execution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3938773#3938773
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3938773