I've read the current (latest) 2.4.4 source of the scheduler this is not the old bug I was talking about, but another I had forgotten til now, and corrected by the way...
note that it is still present in CVS, in last version 1.4.4.1 of the 2.4.4 branch and in last 1.12 version of the 3.0* head branch... summary: in 2 of the 4 dynamic invocation of the timer addnotification method, the "user object" parameter is forgotten... I've attached a version of Scheduler.java that should work I've not tested myself (it works on my variant of Scheduler )... if it correct the problem it should be integrated in 2.4.4 and 3.0 CVS branch you can now : - either: -make the change according to my hypothesis, -or take my code if you are confident - then either : -compile (with jboss.jar, withou the scheduler*.class), rebuild, and deploy jboss.jar, -compile the class, create a jar patch, and refer it in jboss startup options -change the package name, compile as usual, make a jar,put it in lib/ext, and use it instead of org.jboss.util.Scheduler then if ok, could you tell everybody that it works (if not, tell me, and if all fails, I'll make my public self-criticism here 8> ) if it works this mail could be a patch proposal to jboss-dev community (IMHO, a good reason to talk about that here) hope I'm not wrong, and hope it will help... --- long version I've read the code the addNotification refers to JMX standard MBean interface Timer. (could you send me the exact error messages...) the official signatures of addNotification on javax.management.timer.Timer http://dyade.inrialpes.fr/aaa/public/java/jmx/jmx_instr_agent_snmp_javadoc/j mx/index.html java.lang.Integer addNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.util.Date date) java.lang.Integer addNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.util.Date date, long period) java.lang.Integer addNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.util.Date date, long period, long nbOccurences) but in the 3rd and 4th dynamic invocation of addNotification there is no proposed userData object (which is not used here), despite the fact it is needed in all version of the addNotification one should propose a null object as 3rd parameter like it is done in the 1st and 2nd invocation you should change the callsto // Add an initial call mActualSchedule = ( (Integer) getServer().invoke( mTimer, "addNotification", new Object[] { "Schedule", "Scheduler Notification", null, /* user object */ mStartDate }, new String[] { String.class.getName(), String.class.getName(), Object.class.getName(), /* user object */ Date.class.getName(), } ) ).intValue(); and // Add regular schedule mActualSchedule = ( (Integer) getServer().invoke( mTimer, "addNotification", new Object[] { "Schedule", "Scheduler Notification", null, /* user object */ new Date( new Date().getTime() + 1000 ), new Long( mActualSchedulePeriod ), new Long( getRemainingRepetitions() ) }, new String[] { "".getClass().getName(), "".getClass().getName(), Object.class.getName(), /* user object */ Date.class.getName(), Long.TYPE.getName(), Long.TYPE.getName() } ) ).intValue(); so, get the source of 2.4.4, modify them accordingly, or use the version I've attached and then rebuild jboss.jar... if you don't want to change it you can : - get a copy of jboss.jar - remove Scheduler.class (and Scheduler$SchedulableExample.jar and Scheduler$Listenr.class) from this jboss.jar - recompile your version of Scheduler with this jboss.jar and add the compiled classes to this jboss.jar now, and put it in place of the former jboss.jar you can also begin like before with a copy of the jboss.jar, and then build a scheduler-patch.jar with scheduler.class, ad put them in a "patch directory" that you indicate with the "-p" option (I've never tested that) finally the most easy is to copy the Scheduler.java, correct the bug, change the package name (eg: package org.jboss.util.patched;) and use it in place of the former class in jboss.jcml... that is the most easy... if it work could you tell me so that > > -----Message d'origine----- > > De: rajeshwarraov [mailto:[EMAIL PROTECTED]] > > Date: vendredi 4 janvier 2002 08:16 > > À: [EMAIL PROTECTED] > > Objet: [JBoss-dev] Re: scheduler bug? > > > > > > I am also facing same problem...I need the solution > > urgently..anybody out there to help me....
Scheduler.java.patched
Description: Binary data