[jboss-user] [Clustering/JBoss] - Re: Problem singleton scheduling in a clustered JBoss 4.02 (
do-not-reply at jboss.com
Wed Feb 18 10:05:31 EST 2009
Looking at the javadoc for the 4.0.2 version of SingleScheduleProvider I don't see a way to pass in the kind of arguments you want:
| * Sets the method name to be called on the Schedulable MBean. It can optionally be
| * followed by an opening bracket, list of attributes (see below) and a closing bracket.
| * The list of attributes can contain:
| * <ul>
| * <li>NOTIFICATION which will be replaced by the timers notification instance
| * (javax.management.Notification)</li>
| * <li>DATE which will be replaced by the date of the notification call
| * (java.util.Date)</li>
| * <li>REPETITIONS which will be replaced by the number of remaining repetitions
| * (long)</li>
| * <li>SCHEDULER_NAME which will be replaced by the Object Name of the Scheduler
| * (javax.management.ObjectName)</li>
| * <li>any full qualified Class name which the Scheduler will be set a "null" value
| * for it</li>
| * </ul>
| * <br>
| * An example could be: "doSomething( NOTIFICATION, REPETITIONS, java.lang.String )"
| * where the Scheduler will pass the timer's notification instance, the remaining
| * repetitions as int and a null to the MBean's doSomething() method which must
| * have the following signature: doSomething( javax.management.Notification, long,
| * java.lang.String ).
| * @jmx:managed-attribute
| * @param pTargetMethod Name of the method to be called optional followed
| * by method arguments (see above).
| * @throws InvalidParameterException If the given value is not of the right
| * format
| public void setTargetMethod( String pTargetMethod )
Basically you can specify argument types, but what will be passed in will be null, which isn't much use.
In 4.0.3 some changes were made to the scheduling service including a separate config for the argument types versus the argument values. See:
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211121#4211121
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211121
More information about the jboss-user