Author: bhupendrab
Date: Mon Jan 22 08:16:51 2007
New Revision: 498670
URL: http://svn.apache.org/viewvc?view=rev&rev=498670
Log:
modified the mbean and mbean test for any failure in creating TabularData(for
channels)
Modified:
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
Modified:
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java?view=diff&rev=498670&r1=498669&r2=498670
==============================================================================
---
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
(original)
+++
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
Mon Jan 22 08:16:51 2007
@@ -178,7 +178,7 @@
for (AMQChannel channel : list)
{
Object[] itemValues = {channel.getChannelId(),
channel.isTransactional(),
- (channel.getDefaultQueue() != null) ?
channel.getDefaultQueue().getName() : null,
+ (channel.getDefaultQueue() != null) ?
channel.getDefaultQueue().getName().asString() : null,
channel.getUnacknowledgedMessageMap().size()};
CompositeData channelData = new CompositeDataSupport(_channelType,
_channelAtttibuteNames, itemValues);
Modified:
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java?view=diff&rev=498670&r1=498669&r2=498670
==============================================================================
---
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
(original)
+++
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
Mon Jan 22 08:16:51 2007
@@ -26,9 +26,11 @@
import org.apache.qpid.server.exchange.ExchangeRegistry;
import org.apache.qpid.server.queue.DefaultQueueRegistry;
import org.apache.qpid.server.queue.QueueRegistry;
+import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.store.MessageStore;
import org.apache.qpid.server.store.SkeletonMessageStore;
import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.AMQShortString;
import javax.management.JMException;
@@ -50,7 +52,11 @@
// check the channel count is correct
int channelCount = _mbean.channels().size();
assertTrue(channelCount == 1);
- _protocolSession.addChannel(new AMQChannel(2, _messageStore, null));
+ AMQQueue queue = new org.apache.qpid.server.queue.AMQQueue(new
AMQShortString("testQueue_" + System.currentTimeMillis()),
+ false, new
AMQShortString("test"), true, _queueRegistry);
+ AMQChannel channel = new AMQChannel(2, _messageStore, null);
+ channel.setDefaultQueue(queue);
+ _protocolSession.addChannel(channel);
channelCount = _mbean.channels().size();
assertTrue(channelCount == 2);