[jboss-user] [JBoss jBPM] - Re: How to create a Timer on a task-node?

asmo do-not-reply at jboss.com
Thu Jan 11 15:38:57 EST 2007

If the scheduler start you should see something like this:
21:22:44,375 DEBUG [Scheduler] starting the scheduler

And after that, the scheduler should check the database for timer every 5 seconds ( i think 5 seconds is the default value, but i am not sure...) and you can see this: 
21:24:12,328 DEBUG [SchedulerThread] checking for timers

Otherwise, you must start the scheduler.
You could do this in the web.xml. there you must config the scheduler simular to this ( i don t use the scheduler servlet, so i don t know, if this is exactly right).
  |     <servlet-name>JbpmThreadsServlet</servlet-name>
  |     <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class>
  |     <load-on-startup>1</load-on-startup>
  |   </servlet>
  |   <servlet-mapping>
  |     <servlet-name>JbpmThreadsServlet</servlet-name>
  |     <url-pattern>/threads</url-pattern>
  |   </servlet-mapping>
Alternative you could start the main method of the org.jbpm.scheduler.impl.SchedulerThread.
I do this with java reflection in a java class, but i have no big java experience, so this is may not the best way, but it works... :-)
                      String[] nargs = {"4000", "40" ,"dd/MM/yyyy HH:mm:ss"};
  |                       Class sched = Class.forName( "org.jbpm.scheduler.impl.SchedulerMain");
  |                       Method[] methods = sched.getMethods();
  |                       logger.info("Die methoden: " +methods.toString());
  |                       Method methode = sched.getMethod(
  |                                           "main" , nargs.getClass());
  |                       logger.info("Die methode: " + methode.toString());
  |                       methode.invoke( null, new Object[]{nargs} );


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000602#4000602

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000602

More information about the jboss-user mailing list