[jboss-user] [Management, JMX/JBoss] - Re: jboss scheduler losing time

dvinge do-not-reply at jboss.com
Thu Apr 3 04:32:36 EDT 2008


Yes, we have had the same problem.

The issue is a jboss / jdk problem.

The underlying timer you are using are probably from the jdk and not the one from jboss.

The Jdk one, does not use fixedrate, so if your code takes 10 sec to run, then the scheduler will run 10 sec later. (I think we found out that this only applys to jdk6, but I'm not sure)

I have fixed  this by extending the jdk timer, and override the addNotification (the one with 6 arguments), and then calling the super method (the one with 7 argument) allowing you to specify wheater to use fixedrate or not.

And then specifying this timer in your mbeans:

 
   ...
   ...
  jboss:service=TimerMyTimer


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

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



More information about the jboss-user mailing list