[jboss-user] [Management, JMX/JBoss] - SchedulableMBean arguments

thehunt do-not-reply at jboss.com
Wed Aug 16 10:40:55 EDT 2006


Hi,

There is a detail of the ScheduleManager implementation that troubles me. 
I ll give u a short description of what I want to do. 

I want to run a ScheduleManager + Provider as a Singleton in a cluster. A client will be able to register schedules on the provider from any node on the cluster using HA-JNDI as I will expose an RMIAdaptor interface of the Provider MBean. The ScheduleProvider (i have made a custom one) provides  the ScheduleManager with schedules. The manager in turn, notifies a target object (Mbean) , whenever the schedule demands , and calls an appropriate method on the target object. As you can see I wont use xml to describe the scheduling parameters for my custom Provider (start date etc) but every client request on the Provider will register a schedule with its own  parameters.

The only example I ve found so far is this http://www.onjava.com/pub/a/onjava/2003/08/20/jboss_clustering.html?page=2

As you can see it uses the SingleScheduleProvider which comes with Jboss.
It defines the attribute :
 ;hit( NOTIFICATION, DATE, REPETITIONS, SCHEDULER_NAME, java.lang.String )

which refers to the method + arguments of the target object.

The target object is SchedulableMBeanExample which also comes with Jboss.

Ok, here is my problem. As you can imagine I dont wanna use SchedulableMBeanExample  as my target in my own application. So what do I have to do? I have to write my own MBean. So far so good. I thought so as well but when I checked the scheduler package source code i came up with this :
http://docs.jboss.org/jbossas/javadoc/4.0.2/org/jboss/varia/scheduler/ScheduleManager.java.html

If u spend some time and check the code (inner class MBeanListener) u ll see that it takes under consideration only some predefined arguments for the target object's method (ID,NOTIFICATION,DATE ...) and sets all others to Null!

When I saw that, I went back to the given example and noticed that the example's target (SchedulableMBeanExample) takes an extra argument. A simple String. Well, ScheduleManager ignores that as well.

I dont know how to move on now... I want my SchedulableMbean's target method to take some custom arguments but all I see is a list of predefined ones.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965490#3965490

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965490



More information about the jboss-user mailing list