Author: robbie
Date: Tue Dec 7 12:25:45 2010
New Revision: 1043001
URL: http://svn.apache.org/viewvc?rev=1043001&view=rev
Log:
QPID-2973: add JMX support for creating and manipulating queues with new DLQ
functionality
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
qpid/branches/0.5.x-dev/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
Tue Dec 7 12:25:45 2010
@@ -41,6 +41,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import javax.management.JMException;
import javax.management.MBeanException;
@@ -49,6 +50,8 @@ import javax.management.ObjectName;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.framing.FieldTableFactory;
import org.apache.qpid.management.common.mbeans.ManagedBroker;
import org.apache.qpid.management.common.mbeans.ManagedQueue;
import org.apache.qpid.management.common.mbeans.annotations.MBeanConstructor;
@@ -252,17 +255,13 @@ public class AMQBrokerManagerMBean exten
}
}
- /**
- * Creates a new queue and registers it with the registry and puts it
- * in persistance storage if durable queue.
- *
- * @param queueName
- * @param durable
- * @param owner
- * @throws JMException
- */
public void createNewQueue(String queueName, String owner, boolean
durable) throws JMException
{
+ createNewQueue(queueName, owner, durable, null);
+ }
+
+ public void createNewQueue(String queueName, String owner, boolean
durable, Map<String,Object> arguments) throws JMException
+ {
AMQQueue queue = _queueRegistry.getQueue(new
AMQShortString(queueName));
if (queue != null)
{
@@ -277,12 +276,18 @@ public class AMQBrokerManagerMBean exten
{
ownerShortString = new AMQShortString(owner);
}
+
+ FieldTable args = null;
+ if(arguments != null)
+ {
+ args = FieldTable.convertToFieldTable(arguments);
+ }
- queue = AMQQueueFactory.createAMQQueueImpl(new
AMQShortString(queueName), durable, ownerShortString, false, getVirtualHost(),
- null);
+ queue = AMQQueueFactory.createAMQQueueImpl(new
AMQShortString(queueName), durable, ownerShortString,
+ false,
getVirtualHost(), args);
if (queue.isDurable() && !queue.isAutoDelete())
{
- _messageStore.createQueue(queue);
+ _messageStore.createQueue(queue, args);
}
_queueRegistry.registerQueue(queue);
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
Tue Dec 7 12:25:45 2010
@@ -252,4 +252,6 @@ public interface AMQQueue extends Managa
Exchange getAlternateExchange();
void setAlternateExchange(Exchange exchange);
+
+ void setAlternateExchange(String exchangeName);
}
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
Tue Dec 7 12:25:45 2010
@@ -33,6 +33,7 @@ import org.apache.qpid.framing.abstracti
import org.apache.qpid.management.common.mbeans.ManagedQueue;
import org.apache.qpid.management.common.mbeans.annotations.MBeanConstructor;
import org.apache.qpid.management.common.mbeans.annotations.MBeanDescription;
+import org.apache.qpid.server.exchange.Exchange;
import org.apache.qpid.server.management.AMQManagedObject;
import org.apache.qpid.server.management.ManagedObject;
import org.apache.qpid.server.store.StoreContext;
@@ -278,6 +279,19 @@ public class AMQQueueMBean extends AMQMa
return _queue.isOverfull();
}
+ public void setAlternateExchange(String exchangeName)
+ {
+ _queue.setAlternateExchange(exchangeName);
+ }
+
+ public String getAlternateExchange()
+ {
+ Exchange exchange = _queue.getAlternateExchange();
+ AMQShortString name = exchange == null ? null : exchange.getName();
+
+ return name == null ? null : name.asString();
+ }
+
/**
* Checks if there is any notification to be send to the listeners
*/
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Tue Dec 7 12:25:45 2010
@@ -1824,4 +1824,23 @@ public class SimpleAMQQueue implements A
{
_alternateExchange = exchange;
}
+
+ public void setAlternateExchange(String exchangeName)
+ {
+ if(exchangeName == null || exchangeName.equals(""))
+ {
+ _alternateExchange = null;
+ return;
+ }
+
+ Exchange exchange =
getVirtualHost().getExchangeRegistry().getExchange(new
AMQShortString(exchangeName));
+ if(exchange != null)
+ {
+ _alternateExchange = exchange;
+ }
+ else
+ {
+ throw new RuntimeException("Exchange '" + exchangeName + "' is not
registered with the VirtualHost.");
+ }
+ }
}
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java
Tue Dec 7 12:25:45 2010
@@ -20,10 +20,20 @@
*/
package org.apache.qpid.server;
+import java.util.HashMap;
+import java.util.Map;
+
import junit.framework.TestCase;
+
+import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.management.common.mbeans.ManagedBroker;
+import org.apache.qpid.server.exchange.DefaultExchangeFactory;
+import org.apache.qpid.server.exchange.Exchange;
import org.apache.qpid.server.exchange.ExchangeRegistry;
+import org.apache.qpid.server.queue.AMQPriorityQueue;
+import org.apache.qpid.server.queue.AMQQueue;
+import org.apache.qpid.server.queue.AMQQueueFactory;
import org.apache.qpid.server.queue.QueueRegistry;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.registry.IApplicationRegistry;
@@ -79,6 +89,103 @@ public class AMQBrokerManagerMBeanTest e
assertTrue(_queueRegistry.getQueue(new AMQShortString(queueName)) ==
null);
}
+ /**
+ * Tests that setting the {...@link AMQQueueFactory#X_QPID_DLQ_ENABLED}
argument true does
+ * cause the alternate exchange to be set and DLQ to be produced.
+ */
+ public void testCreateNewQueueWithDLQEnabled() throws Exception
+ {
+ Map<String,Object> args = new HashMap<String, Object>();
+ args.put(AMQQueueFactory.X_QPID_DLQ_ENABLED.asString(), true);
+
+ AMQShortString queueName = new
AMQShortString("testCreateNewQueueWithDLQEnabled");
+ AMQShortString dlExchangeName = new AMQShortString(queueName +
DefaultExchangeFactory.DEFAULT_DLE_NAME_SUFFIX);
+ AMQShortString dlQueueName = new AMQShortString(queueName +
AMQQueueFactory.DEFAULT_DLQ_NAME_SUFFIX);
+
+ QueueRegistry qReg = _vHost.getQueueRegistry();
+ ExchangeRegistry exReg = _vHost.getExchangeRegistry();
+
+ assertNull("The DLQ should not yet exist", qReg.getQueue(new
AMQShortString(dlQueueName)));
+ assertNull("The alternate exchange should not yet exist",
exReg.getExchange(dlExchangeName));
+
+ ManagedBroker mbean = new
AMQBrokerManagerMBean((VirtualHost.VirtualHostMBean) _vHost.getManagedObject());
+ mbean.createNewQueue(queueName.asString(), "test", false, args);
+
+ Exchange altExchange = exReg.getExchange(dlExchangeName);
+ assertNotNull("The alternate exchange should be registered as DLQ was
enabled", altExchange);
+ assertEquals("Alternate exchange type was not as expected",
ExchangeDefaults.FANOUT_EXCHANGE_CLASS, altExchange.getType());
+
+ AMQQueue dlQueue = qReg.getQueue(dlQueueName);
+ assertNotNull("The DLQ was not registered as expected", dlQueue);
+ assertTrue("DLQ should have been bound to the alternate exchange",
altExchange.isBound(dlQueue));
+ }
+
+ /**
+ * Tests that setting the {...@link AMQQueueFactory#X_QPID_DLQ_ENABLED}
argument false does not
+ * result in the alternate exchange being set and DLQ being created.
+ */
+ public void testCreateNewQueueWithDLQDisabled() throws Exception
+ {
+ Map<String,Object> args = new HashMap<String, Object>();
+ args.put(AMQQueueFactory.X_QPID_DLQ_ENABLED.asString(), false);
+
+ AMQShortString queueName = new
AMQShortString("testCreateNewQueueWithDLQDisabled");
+ AMQShortString dlExchangeName = new AMQShortString(queueName +
DefaultExchangeFactory.DEFAULT_DLE_NAME_SUFFIX);
+ AMQShortString dlQueueName = new AMQShortString(queueName +
AMQQueueFactory.DEFAULT_DLQ_NAME_SUFFIX);
+
+ QueueRegistry qReg = _vHost.getQueueRegistry();
+ ExchangeRegistry exReg = _vHost.getExchangeRegistry();
+
+ assertNull("The DLQ should not exist", qReg.getQueue(new
AMQShortString(dlQueueName)));
+ assertNull("The alternate exchange should not exist",
exReg.getExchange(dlExchangeName));
+
+ ManagedBroker mbean = new
AMQBrokerManagerMBean((VirtualHost.VirtualHostMBean) _vHost.getManagedObject());
+ mbean.createNewQueue(queueName.asString(), "test", false, args);
+
+ Exchange altExchange = exReg.getExchange(dlExchangeName);
+ assertNull("The alternate exchange should be not registered as DLQ was
disabled", altExchange);
+
+ AMQQueue dlQueue = qReg.getQueue(dlQueueName);
+ assertNull("The DLQ should not be registered as DLQ was disabled on
created queue", dlQueue);
+
+ AMQQueue queue = qReg.getQueue(queueName);
+ assertNull("The alternate exchange should be not set as DLQ wasnt
enabled", queue.getAlternateExchange());
+ }
+
+ /**
+ * Tests that setting the {...@link AMQQueueFactory#X_QPID_PRIORITIES}
argument prompts creation of
+ * a Priority Queue, without alternateExchange or a DLQ being set/created.
+ */
+ public void testCreatePriorityQueue() throws Exception
+ {
+ int numPriorities = 7;
+ Map<String,Object> args = new HashMap<String, Object>();
+ args.put(AMQQueueFactory.X_QPID_PRIORITIES.asString(), numPriorities);
+
+ AMQShortString queueName = new
AMQShortString("testCreatePriorityQueue");
+ AMQShortString dlExchangeName = new AMQShortString(queueName +
DefaultExchangeFactory.DEFAULT_DLE_NAME_SUFFIX);
+ AMQShortString dlQueueName = new AMQShortString(queueName +
AMQQueueFactory.DEFAULT_DLQ_NAME_SUFFIX);
+
+ QueueRegistry qReg = _vHost.getQueueRegistry();
+ ExchangeRegistry exReg = _vHost.getExchangeRegistry();
+
+ assertNull("The DLQ should not exist", qReg.getQueue(new
AMQShortString(dlQueueName)));
+ assertNull("The alternate exchange should not exist",
exReg.getExchange(dlExchangeName));
+
+ ManagedBroker mbean = new
AMQBrokerManagerMBean((VirtualHost.VirtualHostMBean) _vHost.getManagedObject());
+ mbean.createNewQueue(queueName.asString(), "test", false, args);
+
+ AMQQueue queue = qReg.getQueue(queueName);
+ assertEquals("Queue is not a priorty queue", AMQPriorityQueue.class,
queue.getClass());
+ assertEquals("Number of priorities supported was not as expected",
numPriorities, ((AMQPriorityQueue)queue).getPriorities());
+
+ assertNull("The alternate exchange should be not registered as DLQ
wasnt enabled", exReg.getExchange(dlExchangeName));
+ assertNull("The alternate exchange should be not set as DLQ wasnt
enabled", queue.getAlternateExchange());
+
+ AMQQueue dlQueue = qReg.getQueue(dlQueueName);
+ assertNull("The DLQ should not be registered as DLQ wasnt enabled",
dlQueue);
+ }
+
@Override
protected void setUp() throws Exception
{
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
Tue Dec 7 12:25:45 2010
@@ -33,6 +33,7 @@ import org.apache.qpid.server.RequiredDe
import org.apache.qpid.server.subscription.Subscription;
import org.apache.qpid.server.subscription.SubscriptionFactory;
import org.apache.qpid.server.subscription.SubscriptionFactoryImpl;
+import org.apache.qpid.server.exchange.Exchange;
import org.apache.qpid.server.protocol.AMQProtocolSession;
import org.apache.qpid.server.protocol.InternalTestProtocolSession;
import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -369,6 +370,51 @@ public class AMQQueueMBeanTest extends T
assertFalse(channel.getBlocking());
}
+ /**
+ * Tests the get/set methods for manipulating the queues alternate exchange
+ */
+ public void testAlternateExchangeAttribute() throws Exception
+ {
+ assertNull("expected MBean alternate exchange to be null initially",
_queueMBean.getAlternateExchange());
+ assertNull("expected queue alternate exchange to be null initially",
_queue.getAlternateExchange());
+
+ try
+ {
+ //try to set to a non-existent exchange
+ _queueMBean.setAlternateExchange("doesnt-exist-abcdefg");
+ fail("expected exception did not occur");
+ }
+ catch (RuntimeException e)
+ {
+ //expected exception, ignore
+ }
+
+ _queueMBean.setAlternateExchange("amq.fanout");
+ assertNotNull("MBean still reports no alternate exchange",
_queueMBean.getAlternateExchange());
+ assertNotNull("Queue still has no alternate exchange",
_queue.getAlternateExchange());
+
+ Exchange altExch = _virtualHost.getExchangeRegistry().getExchange(new
AMQShortString("amq.fanout"));
+ assertNotNull("failed to retrieve amq.fanout from exchange registry",
altExch);
+
+ assertEquals("unexpected exchange instance set as alternate exchange",
altExch, _queue.getAlternateExchange());
+ assertEquals("unexpected exchange name for alternate exchange",
"amq.fanout", _queueMBean.getAlternateExchange());
+
+ //test using "" clears the value
+ _queueMBean.setAlternateExchange("");
+ assertNull("MBean still reports having an alternate exchange",
_queueMBean.getAlternateExchange());
+ assertNull("Queue still reports having an alternate exchange",
_queue.getAlternateExchange());
+
+ //set amq.fanout as alt exchange again
+ _queueMBean.setAlternateExchange("amq.fanout");
+ assertNotNull("MBean still reports no alternate exchange",
_queueMBean.getAlternateExchange());
+ assertNotNull("Queue still has no alternate exchange",
_queue.getAlternateExchange());
+
+ //test using null clears the value
+ _queueMBean.setAlternateExchange(null);
+ assertNull("MBean still reports having an alternate exchange",
_queueMBean.getAlternateExchange());
+ assertNull("Queue still reports having an alternate exchange",
_queue.getAlternateExchange());
+ }
+
private IncomingMessage message(final boolean immediate, boolean
persistent) throws AMQException
{
MessagePublishInfo publish = new MessagePublishInfo()
Modified:
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
Tue Dec 7 12:25:45 2010
@@ -386,4 +386,9 @@ public class MockAMQQueue implements AMQ
{
}
+
+ public void setAlternateExchange(String exchangeName)
+ {
+
+ }
}
Modified:
qpid/branches/0.5.x-dev/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
Tue Dec 7 12:25:45 2010
@@ -1185,4 +1185,22 @@ public class FieldTable
return _properties.equals(f._properties);
}
+
+ public static FieldTable convertToFieldTable(Map<String, Object> map)
+ {
+ if (map != null)
+ {
+ FieldTable table = new FieldTable();
+ for(Map.Entry<String,Object> entry : map.entrySet())
+ {
+ table.put(new AMQShortString(entry.getKey()),
entry.getValue());
+ }
+
+ return table;
+ }
+ else
+ {
+ return null;
+ }
+ }
}
Modified:
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
Tue Dec 7 12:25:45 2010
@@ -23,6 +23,7 @@ package org.apache.qpid.management.commo
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import javax.management.JMException;
import javax.management.MBeanOperationInfo;
@@ -97,20 +98,38 @@ public interface ManagedBroker
throws IOException, JMException;
/**
- * Create a new Queue on the Broker server
+ * Create a new Queue in the VirtualHost
* @param queueName
* @param durable
* @param owner
* @throws IOException
* @throws JMException
*/
- @MBeanOperation(name="createNewQueue", description="Create a new Queue on
the Broker server", impact= MBeanOperationInfo.ACTION)
+ @MBeanOperation(name="createNewQueue", description="Create a new Queue in
the VirtualHost", impact= MBeanOperationInfo.ACTION)
void createNewQueue(@MBeanOperationParameter(name="queue name",
description="Name of the new queue")String queueName,
@MBeanOperationParameter(name="owner",
description="Owner name")String owner,
@MBeanOperationParameter(name="durable",
description="true if the queue should be durable")boolean durable)
throws IOException, JMException;
/**
+ * Create a new Queue in the VirtualHost
+ *
+ * @since Qpid JMX API 1.10
+ * @param queueName name of the new queue
+ * @param durable true if the queue should be durable
+ * @param owner owner
+ * @param arguments declaration arguments for use when creating the queue,
may be null.
+ * @throws IOException
+ * @throws JMException
+ */
+ @MBeanOperation(name="createNewQueue", description="Create a new Queue in
the VirtualHost", impact= MBeanOperationInfo.ACTION)
+ void createNewQueue(@MBeanOperationParameter(name="queue name",
description="Name of the new queue")String queueName,
+ @MBeanOperationParameter(name="owner",
description="Owner name")String owner,
+ @MBeanOperationParameter(name="durable",
description="true if the queue should be durable")boolean durable,
+ @MBeanOperationParameter(name="arguments",
description="Map of arguments")Map<String,Object> arguments)
+ throws IOException, JMException;
+
+ /**
* Unregisters the Queue bindings, removes the subscriptions and
unregisters
* from the managed objects.
* @param queueName
Modified:
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
Tue Dec 7 12:25:45 2010
@@ -70,6 +70,7 @@ public interface ManagedQueue
String ATTR_CAPACITY = "Capacity";
String ATTR_FLOW_OVERFULL = "FlowOverfull";
String ATTR_FLOW_RESUME_CAPACITY = "FlowResumeCapacity";
+ String ATTR_ALT_EXCHANGE = "AlternateExchange";
//All attribute names constant
String[] QUEUE_ATTRIBUTES = new String[]{
@@ -88,7 +89,8 @@ public interface ManagedQueue
ATTR_RCVD_MSG_COUNT,
ATTR_CAPACITY,
ATTR_FLOW_OVERFULL,
- ATTR_FLOW_RESUME_CAPACITY
+ ATTR_FLOW_RESUME_CAPACITY,
+ ATTR_ALT_EXCHANGE
};
/**
@@ -286,6 +288,25 @@ public interface ManagedQueue
@MBeanAttribute(name="FlowOverfull", description="true if the queue is
considered overfull by the Flow Control system")
boolean isFlowOverfull() throws IOException;
+ /**
+ * Sets the Alternate Exchange for the queue, for use in dead letter queue
functionality.
+ *
+ * @since Qpid JMX API 1.10
+ * @param the name of the exchange to use. Specifying null or the empty
string will clear the alternate exchange.
+ * @throws IOException
+ */
+ void setAlternateExchange(String exchangeName) throws IOException;
+
+ /**
+ * Returns the name of the Alternate Exchange for the queue, or null if
there isn't one.
+ *
+ * @since Qpid JMX API 1.10
+ * @return the name of the Alternate Exchange for the queue, or null if
there isn't one
+ * @throws IOException
+ */
+ @MBeanAttribute(name="AlternateExchange", description="Alternate exchange
for the queue")
+ String getAlternateExchange() throws IOException;
+
//********** Operations *****************//
Modified:
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
Tue Dec 7 12:25:45 2010
@@ -47,7 +47,7 @@ public interface ServerInformation
* Qpid JMX API 1.1 can be assumed.
*/
int QPID_JMX_API_MAJOR_VERSION = 1;
- int QPID_JMX_API_MINOR_VERSION = 9;
+ int QPID_JMX_API_MINOR_VERSION = 10;
/**
Modified:
qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java?rev=1043001&r1=1043000&r2=1043001&view=diff
==============================================================================
---
qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
(original)
+++
qpid/branches/0.5.x-dev/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
Tue Dec 7 12:25:45 2010
@@ -47,7 +47,7 @@ public abstract class ApplicationRegistr
//max supported broker management interface supported by this release of
the management console
public static final int SUPPORTED_QPID_JMX_API_MAJOR_VERSION = 1;
- public static final int SUPPORTED_QPID_JMX_API_MINOR_VERSION = 8;
+ public static final int SUPPORTED_QPID_JMX_API_MINOR_VERSION = 10;
public static final String DATA_DIR = System.getProperty("user.home") +
File.separator + ".qpidmc";
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]