-
1. Re: Running java program within JBoss
kabirkhan May 13, 2004 5:08 AM (in response to mawa)Never tried this, but you'll want to use the org.jboss.varia.scheduler.Scheduler MBean. The docs contain some stuff aout this
-
2. Re: Running java program within JBoss
mawa May 13, 2004 6:00 AM (in response to mawa)I just tried it out --- and it works well. Your java class has to implement the Schedulable interface and therefor you have to write a #perform(Date, long) method. After modified the scheduler-service.xml everything is ok. Seems to be easier than writing an own MBean.
The only problem: The scheduler invokes my code for the first time during his startup, when my EJBs are still not deployed. How can I tell the scheduler to wait until all EJBs are deployed ?
In scheduler-service.xml there is an attribute , but
'NOW + 60sec' doesnt work ;-)
Anyone knows ? -
3. Re: Running java program within JBoss
juha May 14, 2004 12:59 AM (in response to mawa)There are several ways of ordering deployments, all of them covered in the forums many times over, probably most of them also covered in Wiki as well.
Either set an explicit tag on the EJB container (appears under jboss.j2ee domain, jndiName=XXX, service=EJB) or use a different deployment sorter (e.g. prefix sorter) to order, or create a deploy.last folder for your scheduler service. Search the forums and Wiki for more information.