Re: Little problem with MessageBrowser in 0.7.7-alpha-3
Tim Anderson <[email protected]> Sun, 17 Sep 2006 13:16:34 +1000
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
Steffen Silberbach wrote: > Hi all, > > I have a little problem with understanding this message browser > functionality in openjms. I exchanged a sun jms implementation queue > by this openjms queue and didn't change anything in the rest of my > program. so it should work as well as the sun's implementation. but > there's a difference in the message browser. > the sun implementation results in every call of > > Enumeration messages = browser.getEnumeration(); > > a complete list of all messages in the queue. the openjms > implementation results in the first call a complete list, but in the > next calls in an open session it results an empty list, though there > are messages in the queue. if I close the session and query the > browser again, it returns the messages. > the problem is even in the openjms example .. > > is there any workaround or does anyone knows this problem?? > > thanks > steffen The OpenJMS implementation of QueueBrowser works such that getEnumeration() simply returns the enumeration of messages not yet browsed. It does not reset the browser back to the start of the queue. In hindsight, this is a little odd, but not incorrect as far as the JMS specification goes. To restart browsing from the start of the queue, you need to close and recreate the browser. -Tim ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642