SourceForge.net
2004-01-13 08:12:56 UTC
Bugs item #875922, was opened at 2004-01-13 08:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=875922&group_id=54559
Category: message engine
Group: v0.7.6-rc3
Status: Open
Resolution: None
Priority: 5
Submitted By: Bo Min Jiang (bmjiang)
Assigned to: Jim Alateras (jalateras)
Summary: Time to wait for retrieving message is incorrect
Initial Comment:
I have an application that sends several messages at a
time to a queue in OpenJMS. Occasionally, I will get a
timeout error, even though I've specified the time to
wait to be as much as 20 minutes.
Taking a look at the source for class JMSSession, it
seems that there may be a bug in the algorithm used to
determine how long to block for when waiting for a
message. In the method retrieveMessage, the following
code block appears:
// wait for a specific period of time
_receiveLock.wait(wait);
long current = System.currentTimeMillis();
if (current >= end) {
breakOnNextRead = true;
} else {
// update the time to wait. If the value
// is zero then break on the next read
wait -= (end - current);
if (wait == 0) {
breakOnNextRead = true;
}
}
When the receive lock is interrupted and the specified
total time to wait hasn't passed yet, I think the
remaining time to wait should be updated to the
value "end - current", not "wait - (end - current)".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=875922&group_id=54559
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=875922&group_id=54559
Category: message engine
Group: v0.7.6-rc3
Status: Open
Resolution: None
Priority: 5
Submitted By: Bo Min Jiang (bmjiang)
Assigned to: Jim Alateras (jalateras)
Summary: Time to wait for retrieving message is incorrect
Initial Comment:
I have an application that sends several messages at a
time to a queue in OpenJMS. Occasionally, I will get a
timeout error, even though I've specified the time to
wait to be as much as 20 minutes.
Taking a look at the source for class JMSSession, it
seems that there may be a bug in the algorithm used to
determine how long to block for when waiting for a
message. In the method retrieveMessage, the following
code block appears:
// wait for a specific period of time
_receiveLock.wait(wait);
long current = System.currentTimeMillis();
if (current >= end) {
breakOnNextRead = true;
} else {
// update the time to wait. If the value
// is zero then break on the next read
wait -= (end - current);
if (wait == 0) {
breakOnNextRead = true;
}
}
When the receive lock is interrupted and the specified
total time to wait hasn't passed yet, I think the
remaining time to wait should be updated to the
value "end - current", not "wait - (end - current)".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=875922&group_id=54559