[jboss-user] [Clustering/JBoss] - Scheduling app to run on one node only
do-not-reply at jboss.com
Wed Oct 1 14:25:24 EDT 2008
We're in a 2-node cluster environment with various scheduled services. A new application has a requirement to run only one node once a day - our other scheduled apps are fine with running on both nodes and needs to stay that way. In this app's case, the scheduled service is duplicating data in a database due to it running twice daily vs. just once.
Can I modify my .sar's META-INF/jboss-service.xml (vs. having to modify any JBoss configuration) so this particular app only runs one node? Here's the existing .sar jboss-service.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <mbean code="org.jboss.varia.scheduler.Scheduler" name="com.mycompany.myapp:service=MyScheduledService">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">com.mycompany.myapp.MyScheduledService</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">86400000</attribute> <!-- every 24 hours -->
| <attribute name="InitialRepetitions">-1</attribute>
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179882#4179882
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179882
More information about the jboss-user