[ openjms-Bugs-746875 ] QueueBrowser fails to select messages

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #746875, was opened at 2003-06-01 04:28
Message generated for change (Comment added) made by tanderson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=746875&group_id=54559

Category: server
Group: v0.7.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Tim Anderson (tanderson)
Assigned to: Tim Anderson (tanderson)
Summary: QueueBrowser fails to select messages

Initial Comment:
From [email protected] to the openjms-user 
list:

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;
  }
}
   


----------------------------------------------------------------------

>Comment By: Tim Anderson (tanderson)
Date: 2003-06-01 04:43

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.