unknown
2003-06-01 09:43:00 UTC
The following sample doesn't properly work if the
number of messages in
queue exceeds 20.
QueueBrowser browser=qs.createBrowser
(qs.createQueue("edition"),
"JMSMessageID = '"+id+"'");
java.util.Enumeration listeMsg =
browser.getEnumeration();
int i=0;
while (listeMsg.hasMoreElements()) {
Message message = (Message)
listeMsg.nextElement();
if (message != null) {
System.out.print(i++);
System.out.println("
'"+message.getJMSMessageID()+"'");
} else {
break;
}
}
----------------------------------------------------------------------
Message:
Logged In: YES
user_id=557161
This was being caused by a bug in
QueueBrowserEndpoint.receiveMessages() method.
This gets supplied a count of messages to fetch. If none
of the first count messages examined matched the
selection criteria, it would return an empty list,
signifying no matching messages.
It now returns iff:
. up to count messages match the selection criteria; or
. all messages have been examined
Fix will be available in the 0.7.6 release.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=746875&group_id=54559
number of messages in
queue exceeds 20.
QueueBrowser browser=qs.createBrowser
(qs.createQueue("edition"),
"JMSMessageID = '"+id+"'");
java.util.Enumeration listeMsg =
browser.getEnumeration();
int i=0;
while (listeMsg.hasMoreElements()) {
Message message = (Message)
listeMsg.nextElement();
if (message != null) {
System.out.print(i++);
System.out.println("
'"+message.getJMSMessageID()+"'");
} else {
break;
}
}
----------------------------------------------------------------------
Comment By: Tim Anderson (tanderson)
Date: 2003-06-01 04:43Message:
Logged In: YES
user_id=557161
This was being caused by a bug in
QueueBrowserEndpoint.receiveMessages() method.
This gets supplied a count of messages to fetch. If none
of the first count messages examined matched the
selection criteria, it would return an empty list,
signifying no matching messages.
It now returns iff:
. up to count messages match the selection criteria; or
. all messages have been examined
Fix will be available in the 0.7.6 release.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=746875&group_id=54559