This content has been marked as final.
Show 1 reply
-
1. Re: [JBOSS 4] Pb Schedulers
bobunny Jul 31, 2006 9:50 AM (in response to bobunny)For informtion, I found this warning several times :
* ATTENTION: The scheduler instance only allows to run one schedule at a time.
* Therefore when you want to run two schedules create to instances with this
* MBean. Suggested Object Name for the MBean are:
* :service=Scheduler,schedule=<you schedule name>
* This way you should not run into a name conflict.
So i tried to apply this recommandation, and changed my configuration file into something like this :<mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler,schedule=CrestScheduler"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">jpea.dataimport.crest.CrestFileImporter</attribute> <attribute name="SchedulableArguments">import, crest_(cas|dbv)_.+\.csv$, DataimportPool, DEV</attribute> <attribute name="SchedulableArgumentTypes">java.lang.String, java.lang.String, java.lang.String, java.lang.String</attribute> <attribute name="InitialStartDate">0</attribute> <attribute name="SchedulePeriod">300000</attribute> <attribute name="InitialRepetitions">-1</attribute> </mbean>
instead of<mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=SchedulerCrest"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">jpea.dataimport.crest.CrestFileImporter</attribute> <attribute name="SchedulableArguments">import, crest_(cas|dbv)_.+\.csv$, DataimportPool, DEV</attribute> <attribute name="SchedulableArgumentTypes">java.lang.String, java.lang.String, java.lang.String, java.lang.String</attribute> <attribute name="InitialStartDate">0</attribute> <attribute name="SchedulePeriod">300000</attribute> <attribute name="InitialRepetitions">-1</attribute> </mbean>
But this change has no success.
Then I also tried to allocate a different Timer for each scheduler with a dependance like below :<mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=SchedulerCrest"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">jpea.dataimport.crest.CrestFileImporter</attribute> <attribute name="SchedulableArguments">import, crest_(cas|dbv)_.+\.csv$, DataimportPool, DEV</attribute> <attribute name="SchedulableArgumentTypes">java.lang.String, java.lang.String, java.lang.String, java.lang.String</attribute> <attribute name="InitialStartDate">0</attribute> <attribute name="SchedulePeriod">300000</attribute> <attribute name="InitialRepetitions">-1</attribute> <depends> <mbean code="javax.management.timer.Timer" name="jboss:service=myTimer1"/> </depends> </mbean> <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=SchedulerBony"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">jpea.dataimport.triparty.bony.BonyFileImporter</attribute> <attribute name="SchedulableArguments">import, bony_(i|d)_.+\.txt$, DataimportPool, DEV</attribute> <attribute name="SchedulableArgumentTypes">java.lang.String, java.lang.String, java.lang.String, java.lang.String</attribute> <attribute name="InitialStartDate">0</attribute> <attribute name="SchedulePeriod">300000</attribute> <attribute name="InitialRepetitions">-1</attribute> <depends> <mbean code="javax.management.timer.Timer" name="jboss:service=myTimer2"/> </depends> </mbean>
That didn't change anything...