"ssjboss" wrote : please try this
|
| qbrowser = qsession.createBrowser(queue);
| Enumeration e = qbrowser.getEnumeration(); // gets list of messages.
|
| while (e.hasMoreElements()) {
| // counter variable
| }
|
| -------
| SS
That's really not a good idea - traversing a queue with a browser to find out number
of messages is going to be very slow.
Why not just use the JMX management interface? See message counters in the user guide.
It's all in the documentation!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148062#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...