hey all,
     I am facing some problem when I am trying to run a queue browser on JMS 
queues. The JMS queue is configured to MQ Queue. When I browse through the 
Local JMS queue (queue/A) I am able to browse. On the other hand When the queue 
is configured to MQ Queue, and when I browse I have the following error,

  | Cannot browse the Queue; - nested throwable: (java.lang.ClassCastException)
  | JNDI API lookup failed: org.jboss.mq.SpyJMSException: Cannot browse the 
Queue; - nested throwable: (java.lang.ClassCastException)
  | org.jboss.mq.SpyJMSException: Cannot browse the Queue; - nested throwable: 
(java.lang.ClassCastException)
  |     at 
org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:66)
  |     at 
org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:51)
  |     at org.jboss.mq.Connection.browse(Connection.java:861)
  |     at org.jboss.mq.SpyQueueBrowser.getEnumeration(SpyQueueBrowser.java:83)
  |     at JmsJmsWhatIsThis.main(JmsJmsWhatIsThis.java:74)
  | Caused by: java.lang.ClassCastException
  |     at 
org.jboss.mq.security.ServerSecurityInterceptor.browse(ServerSecurityInterceptor.java:82)
  |     at 
org.jboss.mq.server.TracingInterceptor.browse(TracingInterceptor.java:526)
  |     at 
org.jboss.mq.server.JMSServerInvoker.browse(JMSServerInvoker.java:212)
  |     at 
org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:97)
  |     at 
org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
  |     at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
  |     at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
  |     at java.lang.Thread.run(Thread.java:534)
  | 
  | the Client Code used was as follows,
  | 
  |   |             //get queue connection factory
  |   |             QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
  |   |                     .lookup(cf);
  |   | 
  |   |             //create a connection
  |   |             qc = qcf.createQueueConnection();
  |   | 
  |   | 
  |   |             //create a session.
  |   |             session = qc.createQueueSession(false,
  |   |                     Session.AUTO_ACKNOWLEDGE);
  |   | 
  |   |             //get queue
  |   |             Queue q = (Queue) ctx.lookup(queueName);
  |   |             QueueBrowser qb = session.createBrowser(q);
  |   |             Enumeration list = qb.getEnumeration();
  |   |             int count = 0;
  |   |             while(list.hasMoreElements()) {
  |   |                 System.out.println("list = " + list.nextElement());
  |   |                 count++;
  |   |             }
  |   | 
  | Here basically I am interested to know the Queue debth usin JMS.

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to