Why isn't the following code browsing the messages in my queue? what is my mistake?
public Enumeration listMessages() { | QueueSession session = null; | QueueBrowser browser = null; | Enumeration queueContents = null; | try { | session = _queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE); | queueContents = browser.getEnumeration(); | while (queueContents.hasMoreElements()) | _log.debug(queueContents.nextElement()); | } catch (JMSException e) { | throw new InternalException(e); | } finally { | closeQueueBrowser(browser); | closeSession(session); | } | return queueContents; | } | Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893153#3893153 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893153 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user