我正在尝试让调度程序在 JBoss 中工作为 5。
到目前为止,我已经创建了自己的 MBean(它可以工作),并且我创建了这样的调度程序:
<mbean code="org.jboss.varia.scheduler.Scheduler"
name=":service=Scheduler,name=SchedulableMBeanExample">
<depends>user:service=Print</depends>
<attribute name="StartAtStartup">true</attribute>
<attribute name="SchedulableMBean">user:service=Print</attribute>
<attribute name="SchedulableMBeanMethod">print(java.lang.String)</attribute>
<attribute name="InitialStartDate">NOW</attribute>
<attribute name="SchedulePeriod">10000</attribute>
<attribute name="InitialRepetitions">10</attribute>
<attribute name="FixedRate">true</attribute></mbean>
它有效,但主要问题是如何指定要作为参数传递给我的方法的字符串?
我已经搜索过,但我发现的唯一更接近的是这个属性:“SchedulableArguments”,但这仅适用于构造函数。
谢谢你们的帮助。
劳伦特。