my sugestion would be to do something like the @Depends tag
the xml is
<mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">org.jboss.varia.scheduler.example.SchedulableExample</attribute> <attribute name="SchedulableArguments">Schedulabe Test,12345</attribute> <attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute> <attribute name="InitialStartDate">0</attribute> <attribute name="SchedulePeriod">10000</attribute> <attribute name="InitialRepetitions">-1</attribute> </mbean>
so if in an mbean you could have a tag along the lines of
@Schedule(initalStartDate="0", schedulePeriod="10000", initialRepetitions="-1", schedulableArguments="Test, 12345")
This would then activate a schedule of the mbean.
This would be a big benifit, and get away from having to deploy the xml file.
looks like a good idea. I've created a JIRA task for it. It is scheduled for RC6, but I don't think we'll get there in time. I don't think there's any reason why this feature shouldn't be usable with @Stateless beans too.
very true, that would make alot of sense.
thanks for that.