[jboss-jira] [JBoss JIRA] (JBMESSAGING-1928) MessagingClusterHealthMBean.makeSureDelay() can loop forever
Yong Hao Gao (JIRA)
jira-events at lists.jboss.org
Mon Jul 23 00:58:09 EDT 2012
[ https://issues.jboss.org/browse/JBMESSAGING-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yong Hao Gao updated JBMESSAGING-1928:
--------------------------------------
Fix Version/s: 1.4.8.SP9
(was: 1.4.8.SP8)
> MessagingClusterHealthMBean.makeSureDelay() can loop forever
> ------------------------------------------------------------
>
> Key: JBMESSAGING-1928
> URL: https://issues.jboss.org/browse/JBMESSAGING-1928
> Project: JBoss Messaging
> Issue Type: Bug
> Components: JMS Clustering
> Affects Versions: 1.4.8.SP7
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Fix For: 1.4.8.SP9
>
>
> Here is MessagingClusterHealthMBean.makeSureDelay():
> {code}
> private void makeSureDelay()
> {
> long delay = shutdownDelay;
>
> while (delay > 0)
> {
> long stopTime = System.currentTimeMillis();
> try
> {
> Thread.sleep(delay);
> }
> catch (InterruptedException e)
> {
> }
> delay = shutdownDelay - (System.currentTimeMillis() - stopTime);
> }
>
> }
> {code}
> I believe the problem here is this line:
> {code}
> delay = shutdownDelay - (System.currentTimeMillis() - stopTime);
> {code}
> On systems where the clock doesn't have good accuracy (e.g. on a virtual machine) then every time through the loop {{delay}} will be reset relative to {{shutdownDelay}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list