Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
03. Mar 2008, 10:06 CET | Link

Is there any magic involved with interval-timers in WAR deployments? I have the Quartz scheduler configured in components.xml and I see it start up. I observe the seam post initialization event and it calls my method


@Asynchronous
public QuartzTriggerHandle sync(@Expiration Date start, @IntervalDuration long interval) {

but only once. What could case the interval (60000) to be ignored? Missing the intercept?

I'm running Seam 2.0.1.GA on JBoss 4.2.2.GA

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

2 Replies:
03. Mar 2008, 10:15 CET | Link
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...

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

01. May 2008, 02:53 CET | Link

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