[jboss-user] [JBoss Messaging] - Re: Monitoring the depth of a Queue/Topic
jurivrljicak
do-not-reply at jboss.com
Thu Feb 22 08:06:22 EST 2007
this way?
QueueBrowser browser = s.createBrowser(queue);
int depth= getDepth(browser);
private int getDepth(QueueBrowser browser) throws JMSException {
int i=0;
for(Enumeration e = browser.getEnumeration(); e.hasMoreElements(); ){
i++;
e.nextElement();
}
return i;
}
javax.jms api
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020543#4020543
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020543
More information about the jboss-user
mailing list