Hello again,

I hope you kept my last mail about MBeans. We gonna call it with a scheduler,
called ConnectorService:

Just add this in your jboss-service.xml to schedule your MBean


<mbean
code="com.kiala.kialapointserver.b2b.inbound.xmlqueuer.ConnectorService"
        name="kiala.b2b:service=Connector">
 
<depends>jboss.j2ee:service=EjbModule,module=KialaPointServer.jar</depends>
        <depends>jboss:service=Naming</depends>
</mbean>

<mbean code="org.jboss.varia.scheduler.Scheduler"
        name="kiala.scheduling:service=Connector">
        <depends>kiala.b2b:service=Connector</depends>
        <attribute name="StartAtStartup">true</attribute>
        <attribute
name="SchedulableMBean">kiala.b2b:service=Connector</attribute>
        <attribute
name="SchedulableMBeanMethod">processPendingInstructions()</attribute>
        <attribute name="InitialStartDate">NOW</attribute>
        <attribute name="SchedulePeriod">60000</attribute>
        <attribute name="InitialRepetitions">-1</attribute>
</mbean

As you can see the MBean that schedules depends on the scheduled MBean (here
kiala.b2b:Connector). You just have to specify the method to invoke on the
MBean. Please note that some information such as the number of repetitions
remaining, the object that invoke the operation and the date at which it was
scheduled could be pass, provided you change the signature of your method.

See scheduler-service.xml in your JBoss deploy director

Regards,

Stephane Nicoll
Kiala



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 1:33 PM
To: jboss mailing list 
Subject: [JBoss-user] scheduler service


Hi all,

Is it possible to call a call a MBean method using a scheduler service?
And if so, where can I find an example to do this? I have looked into the 
JBoss (subscription) documentation.
In chapter 10 I only find an example which uses a class which implements a 
Schedulable interface....

Thanks,

Harm de Laat
Informatiefabriek
The Netherlands




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to