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"?>
| <server>
| <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>
| <depends>
| jboss.jca:service=DataSourceBinding,name=jdbc/MyDataSource
| </depends>
| </mbean>
| </server>
|
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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user