A simple way to create a sceduler is to implement Schedulable interface, you 
have to implement public void perform(Date data, long l) method.
This interface is found in sceduler-plugin.jar, for jboss 4.0.5.

A sample cod is:

public class MyScheduler implements Schedulable
  | {
  |        public void perform(Date data, long l)
  |     {
  |             execute();
  |     }
  | }
  | 
and the deployment descriptor from jboss-service is:

<server>
  |         <mbean code="org.jboss.varia.scheduler.Scheduler"
  |                 name="acme:service=Scheduler">
  |                 <attribute name="StartAtStartup">true</attribute>
  |                 <attribute name="SchedulableClass">MyScheduler</attribute>  
     
  |                 <attribute name="InitialStartDate">NOW</attribute>
  |                 <attribute name="SchedulePeriod">60000</attribute>
  |                 <attribute name="InitialRepetitions">-1</attribute>     
  |         </mbean>
  | </server>

I hope it helps you.



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094382
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to