[jboss-user] [Messaging, JMS & JBossMQ] - Re: queue statistics

marcobaroetto do-not-reply at jboss.com
Thu Feb 7 10:37:58 EST 2008


i got it:


  | 
  | try{
  | 				ObjectName queueObjectName = ObjectName.getInstance(stringObjectName);
  | 				
  | 				org.jboss.mq.server.jmx.QueueMBean queueMBean = 
  | 					(org.jboss.mq.server.jmx.QueueMBean) MBeanServerInvocationHandler.newProxyInstance(
  | 							server,
  | 							queueObjectName,
  | 							org.jboss.mq.server.jmx.QueueMBean.class,
  | 							false
  | 						);
  | 				
  | 				 
  | 				System.out.println("--------  QUEUE STATISTICS "+i+" ---------");
  | 				System.out.println("queue depth "+i+": " + queueMBean.getQueueDepth());
  | 				System.out.println("in process "+i+": " + queueMBean.getInProcessMessageCount());
  | 				System.out.println("scheduled "+i+": " + queueMBean.getScheduledMessageCount());
  | 				System.out.println("retries "+i+": " + queueMBean.getRecoveryRetries());
  | 				System.out.println("---------------------------------------------------");
  | 				 			
  | 				
  | 			}catch (Exception e){
  | 				System.out.println("cannot get depth of the queue: " + e.getMessage() );
  | 			}	

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

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



More information about the jboss-user mailing list