Thanks, well sounds like a good solution (i thought about it as well ;) however 
i would like to investigate some more options comming to this investigation i 
noticed that in the jmx-console there is this : 

anonymous wrote : java.util.List listMessages()
  | 
  | MBean Operation.

for the specific queue in the URL like: 
http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.mq.destination%3Aservice%3DQueue%2Cname%3Dyour_queue_name


Now i invoked the listMessages() operation and i saw no messages on screen its 
empty [] , i know i have messages in the queue, i can even see them in the 
database that holds the messages... is this a bug?

Moreover i wrote some code that browses all messages in queue and it returns 
nothing, as if it thinks there are no messages in queue... i think its related 
to the fact that the jmx listMessages() returned an empty list (perhaps the 
same bug)

here is my code:


  |   public Enumeration listMessages() {
  |     // http://wiki.jboss.org/wiki/Wiki.jsp?page=JmsBrowserBean
  |     QueueSession session = null;
  |     QueueBrowser browser = null;
  |     Enumeration queueContents = null;
  |     String messageSelector = null; // 
http://infocenter.sybase.com/help/topic/com.sybase.help.easerver_5.2/html/easpg/easpgp538.htm#BABCGIJE
  |     // http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html
  | 
  |     try {
  |         session = _queueConnection.createQueueSession(false, 
QueueSession.AUTO_ACKNOWLEDGE);
  |         if (messageSelector != null) {
  |             browser = session.createBrowser(_queue, messageSelector);
  |         } else {
  |             browser = session.createBrowser(_queue);
  |         }
  |         queueContents = browser.getEnumeration();
  |                     while (queueContents.hasMoreElements())
  |                             _log.debug(queueContents.nextElement()); // 
nothing :( although i have messages... nothing in this enumeration... :( why??? 
  |     } catch (JMSException e) {
  |             throw new InternalException(e);
  |             } finally {
  |         closeQueueBrowser(browser);
  |         closeSession(session);
  |     }
  |     return queueContents;   
  |   }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3888465#3888465

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3888465


-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to