resolve compilation error, test still fails though

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@883450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-11-23 18:35:58 +00:00
parent c26dd6a5e1
commit d7a8bc89e8
1 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,6 @@ import javax.jms.MessageNotWriteableException;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import junit.framework.TestCase;
@ -29,6 +28,7 @@ import org.apache.activemq.broker.BrokerTestSupport;
import org.apache.activemq.broker.StubConnection;
import org.apache.activemq.broker.TransportConnector;
import org.apache.activemq.broker.jmx.ManagementContext;
import org.apache.activemq.broker.jmx.QueueViewMBean;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQTextMessage;
import org.apache.activemq.command.ConnectionId;
@ -361,8 +361,9 @@ public class BrokerNetworkWithStuckMessagesTest extends TestCase /*NetworkTestSu
ObjectName queueObjectName = ObjectName.getInstance(amqDomain, params);
ManagementContext mgmtCtx = broker.getManagementContext();
MBeanServer mbs = mgmtCtx.getMBeanServer();
Object[] messages = (Object[]) mbs.invoke(queueObjectName, "browse", new Object[0], new String[0]);
QueueViewMBean queueView = (QueueViewMBean)mgmtCtx.newProxyInstance(queueObjectName, QueueViewMBean.class, true);
Object[] messages = (Object[]) queueView.browse();
LOG.info("+Browsed with JMX: " + messages.length);