Hi Geeks

During the changes for the next release of the JBoss
Scheduler I was wondering if there is a need for you
that the Schedulable can be a MBean instead of instance
created within the Scheduler. This would allow you to
add the Schedulable interface to a MBean and use the
Scheduler to trigger calls to the MBean in timed intervals.

My current idea is to add the attribute "SchedulableObjectName"
allowing to specify the MBean Object Name. Whenever you
also specify a "SchedulableClass" the MBean will be created,
initialized and started before it is used (similar to JSP Bean
where you can use type of class). The Notification
Listener would then use the local MBeanServer to
invoke the "perform" method through JMX. Setup could
look like this:

  <mbean code="org.jboss.util.Scheduler" name=":service=Scheduler">
    <attribute
name="SchedulableClass">org.jboss.util.Scheduler$SchedulableExample</attribu
te>
    <attribute
name="SchedulableObjectName">JBOSS-SYSTEM:service=gugus</attribute>
    <attribute name="InitArguments">Schedulabe Test,12345</attribute>
    <attribute name="InitTypes">java.lang.String,int</attribute>
    <attribute name="InitialStartDate">0</attribute>
    <attribute name="SchedulePeriod">10000</attribute>
    <attribute name="NrOfRepetitions">-1</attribute>
    <attribute name="StartAtStartup">true</attribute>
  </mbean>

Give me your input, thanx.

xxxxxxxxxxxxxxxxx
Andreas Schaefer
Senior Consultant
JBoss Group, LLC
xxxxxxxxxxxxxxxxx


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to