MBeanServerConnection connection = connector.getMBeanServerConnection();
ObjectName name = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost," +
"destinationType=Queue,destinationName=TEST.Q");
QueueViewMBean queueMbean = MBeanServerInvocationHandler.newProxyInstance(connection, name, QueueViewMBean.class, true);
String msgId = queueMbean.sendTextMessage("test", "system", "manager");
queueMbean.moveMessageTo(msgId, "TEST1.Q");
}
public void testBrowseExpiredMessages() throws Exception {
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi");
JMXConnector connector = JMXConnectorFactory.connect(url, null);