I've currently got a Scheduleable - ie a class that extends 
org.jboss.varia.scheduler.Schedulable and it is deployed in a SAR with the 
following sort of jboss-service.xml


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <server>
  |   <classpath codebase="lib" archives="scheduler-plugin.jar"/>
  | 
  |   <mbean code="org.jboss.varia.scheduler.Scheduler"
  |         name="mydomain:service=MySchedulabler">
  |             
  |     <attribute name="StartAtStartup">true</attribute>
  |             
  |     <attribute name="SchedulableClass">
  |         my.example.SchedulableClass
  |     </attribute>
  | 
  |     <attribute name="InitialStartDate">NOW</attribute>
  |     <attribute name="InitialRepetitions">-1</attribute>
  |     <attribute name="SchedulePeriod">60000</attribute>
  |     <attribute name="SchedulableArguments">
  |         password, password
  |     </attribute>
  |             
  |     <attribute name="SchedulableArgumentTypes">
  |         java.lang.String, java.lang.String
  |     </attribute>
  | 
  |     <attribute name="TimerName">mydomain:service=MyTimer</attribute>
  |   
  |     <depends>
  |         <mbean code="javax.management.timer.Timer"
  |                 name="mydomain:service=MyTimer" />
  |     </depends>
  |   </mbean>
  | </server>

But now I want to deploy this so that it is a HASingleton - ie I only want this 
schedulable to be kicked off on one node in a cluster, not every node.

What is the easiest way for me to convert from the configuration I have to a 
singleton?

I've seen some documentation around (JBoss AS Clustering ed7) that demonstrates 
a singleton schedulable, but only by using a defined MBean as the target action 
of a org.jboss.varia.scheduler.SingleScheduleProvider MBean. Is the easiest way 
to go from what I have now to a singleton schedulable define my task (class 
that currently extends Schedulable) as an MBean and then use the 
org.jboss.varia.scheduler.SingleScheduleProvider?

I'm just a bit confused about the right way to configure this...

Thanks,
Dion.

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to