[
https://issues.jboss.org/browse/JBMESSAGING-1928?page=com.atlassian.jira....
]
Justin Bertram updated JBMESSAGING-1928:
----------------------------------------
Description:
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}}.
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.SP8
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