This content has been marked as final.
Show 2 replies
-
1. Re: Asynchronous Quartz method called only once
nickarls Mar 3, 2008 10:15 AM (in response to nickarls)
Nicklas Karlsson wrote on Mar 03, 2008 10:06 AM:
What could case the interval (60000) to be ignored? Missing the intercept?
More like cached classes somewhere. Got it working now. Awarding 5 stars to myself...
-
2. Re: Asynchronous Quartz method called only once
zahidmaqbool May 1, 2008 2:53 AM (in response to nickarls)Hey Nicholas I also have the same problem....
Can you tell me how to solve this problem here is my piece of code...
@Transactional @Name("startupTesting") public class StartupTesting { @Logger private Log log; @In JbpmContext jbpmContext; /** * This is called by seam after initialization * has finished. */ @Observer("org.jboss.seam.postInitialization") public void observe() { try { Calendar cal = Calendar.getInstance (); cal.set (2040, Calendar.MAY, 10); schedulePayment(new Date(), 60*1000L, cal.getTime()); } catch(Exception e) { e.printStackTrace(); log.info("Operation Failed"); } log.info("About to load system properties"); } @Asynchronous public QuartzTriggerHandle schedulePayment(@Expiration Date when, @IntervalDuration Long interval, @FinalExpiration Date endDate ) { // do the repeating or long running task until endDate System.out.println("\n\n\n\n-------------------------------------" + "Scheduler Started, Executing Job to Process AFS Response Downloader and State Progressor----------------\n\n\n\n"); QuartzTriggerHandle handle = new QuartzTriggerHandle("AFSTrigger"); log.info("Trying to load Test Jbpm Process Instance"); org.jbpm.graph.exe.ProcessInstance pi = jbpmContext.loadProcessInstance(60787l); System.out.println(pi.getKey()+" ----- "+pi.getStart()); return handle; } }
Would really appreciate your help