From b2a65b3c968528706fbed1632891590b088d5007 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Tue, 6 Feb 2007 13:05:01 +0000 Subject: Revision: 504112 Author: bhupendrab Date: 12:44:21, 06 February 2007 Message: To make this management console with the java broker with no virtual host mbean implementation, default virtual host is assigned to all mbeans ---- Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanTypeTabControl.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/TreeObject.java Revision: 504025 Author: gsim Date: 08:24:41, 06 February 2007 Message: Applied patch from Jonathan Anstey to fix trivial compile error. ---- Modified : /incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java Revision: 503790 Author: bhupendrab Date: 17:45:09, 05 February 2007 Message: QPID-326 AMQQueueMBean updated with attribute MaximumMessageAge ---- Modified : /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java Modified : /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java Modified : /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java Modified : /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java Modified : /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java Revision: 503706 Author: bhupendrab Date: 14:45:18, 05 February 2007 Message: QPID-213 Also the parameter selection of boolean type is made as check-boxes instead of a drop-down. ---- Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanTypeTabControl.java Modified : /incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java ConcurrentSelectorDeliveryManager.java - comment change management pom skip tests as there are none. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/perftesting@504121 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/server/AMQBrokerManagerMBean.java | 3 +- .../qpid/server/configuration/Configurator.java | 17 +++++- .../configuration/VirtualHostConfiguration.java | 3 +- .../qpid/server/management/ManagedBroker.java | 2 +- .../server/protocol/AMQProtocolSessionMBean.java | 64 ++++++++++++++-------- .../apache/qpid/server/queue/AMQQueueMBean.java | 55 +++++++------------ .../queue/ConcurrentSelectorDeliveryManager.java | 36 +++++------- .../org/apache/qpid/server/queue/ManagedQueue.java | 15 +++++ qpid/java/management/eclipse-plugin/pom.xml | 3 + .../qpid/server/AMQBrokerManagerMBeanTest.java | 18 +++--- 10 files changed, 118 insertions(+), 98 deletions(-) diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java index 509f57be7f..e244540856 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java @@ -132,8 +132,7 @@ public class AMQBrokerManagerMBean extends AMQManagedObject implements ManagedBr * @param autoDelete * @throws JMException */ - public void createNewQueue(String queueName, boolean durable, String owner, boolean autoDelete) - throws JMException + public void createNewQueue(String queueName, String owner, boolean durable,boolean autoDelete) throws JMException { AMQQueue queue = _queueRegistry.getQueue(queueName); if (queue != null) diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/Configurator.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/Configurator.java index 5e3ac03ba7..5d28d82359 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/Configurator.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/Configurator.java @@ -38,13 +38,13 @@ public class Configurator private static final Logger _logger = Logger.getLogger(Configurator.class); /** - * Configure a given instance using the application configuration. Note that superclasses are not + * Configure a given instance using the supplied configuration. Note that superclasses are not * currently configured but this could easily be added if required. * @param instance the instance to configure + * @param config the configuration to use to configure the object */ - public static void configure(Object instance) + public static void configure(Object instance, Configuration config) { - final Configuration config = ApplicationRegistry.getInstance().getConfiguration(); for (Field f : instance.getClass().getDeclaredFields()) { @@ -56,6 +56,17 @@ public class Configurator } } + /** + * Configure a given instance using the application configuration. Note that superclasses are not + * currently configured but this could easily be added if required. + * @param instance the instance to configure + */ + public static void configure(Object instance) + { + configure(instance, ApplicationRegistry.getInstance().getConfiguration()); + } + + private static void setValueInField(Field f, Object instance, Configuration config, Configured annotation) { Class fieldClass = f.getType(); diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java index a433351509..619baf2acd 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java @@ -154,8 +154,7 @@ public class VirtualHostConfiguration } - - Configurator.configure(queue);//, queueConfiguration); + Configurator.configure(queue, queueConfiguration); } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java index aec7d6cb73..887411c822 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java @@ -79,8 +79,8 @@ public interface ManagedBroker */ @MBeanOperation(name="createNewQueue", description="Create a new Queue on the Broker server", impact= MBeanOperationInfo.ACTION) void createNewQueue(@MBeanOperationParameter(name="queue name", description="Name of the new queue")String queueName, - @MBeanOperationParameter(name="durable", description="true if the queue should be durable")boolean durable, @MBeanOperationParameter(name="owner", description="Owner name")String owner, + @MBeanOperationParameter(name="durable", description="true if the queue should be durable")boolean durable, @MBeanOperationParameter(name="autoDelete", description="true if the queue should be auto delete") boolean autoDelete) throws IOException, JMException; diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java index 0ceadcb30b..620107c48d 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java @@ -53,30 +53,42 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed private AMQMinaProtocolSession _session = null; private String _name = null; //openmbean data types for representing the channel attributes - private String[] _channelAtttibuteNames = {"Channel Id", "Transactional", "Default Queue", "Unacknowledged Message Count"}; - private String[] _indexNames = {_channelAtttibuteNames[0]}; - private OpenType[] _channelAttributeTypes = {SimpleType.INTEGER, SimpleType.BOOLEAN, SimpleType.STRING, SimpleType.INTEGER}; - private CompositeType _channelType = null; // represents the data type for channel data - private TabularType _channelsType = null; // Data type for list of channels type + private final static String[] _channelAtttibuteNames = {"Channel Id", "Transactional", "Default Queue", "Unacknowledged Message Count"}; + private final static String[] _indexNames = {_channelAtttibuteNames[0]}; + private final static OpenType[] _channelAttributeTypes = {SimpleType.INTEGER, SimpleType.BOOLEAN, SimpleType.STRING, SimpleType.INTEGER}; + private static CompositeType _channelType = null; // represents the data type for channel data + private static TabularType _channelsType = null; // Data type for list of channels type + private static final String BROKER_MANAGEMENT_CONSOLE_HAS_CLOSED_THE_CONNECTION = "Broker Management Console has closed the connection."; @MBeanConstructor("Creates an MBean exposing an AMQ Broker Connection") public AMQProtocolSessionMBean(AMQMinaProtocolSession session) throws JMException { super(ManagedConnection.class, ManagedConnection.TYPE); _session = session; + String remote = getRemoteAddress(); + remote = "anonymous".equals(remote) ? remote + hashCode() : remote; + _name = jmxEncode(new StringBuffer(remote), 0).toString(); init(); } - /** - * initialises the openmbean data types - */ - private void init() throws OpenDataException + static + { + try + { + init(); + } + catch (JMException ex) + { + // It should never occur + System.out.println(ex.getMessage()); + } + } + + /** initialises the openmbean data types */ + private static void init() throws OpenDataException { - String remote = getRemoteAddress(); - remote = "anonymous".equals(remote) ? remote + hashCode() : remote; - _name = jmxEncode(new StringBuffer(remote), 0).toString(); _channelType = new CompositeType("Channel", "Channel Details", _channelAtttibuteNames, - _channelAtttibuteNames, _channelAttributeTypes); + _channelAtttibuteNames, _channelAttributeTypes); _channelsType = new TabularType("Channels", "Channels", _channelType, _indexNames); } @@ -119,6 +131,7 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed * commits transactions for a transactional channel * * @param channelId + * * @throws JMException if channel with given id doesn't exist or if commit fails */ public void commitTransactions(int channelId) throws JMException @@ -142,6 +155,7 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed * rollsback the transactions for a transactional channel * * @param channelId + * * @throws JMException if channel with given id doesn't exist or if rollback fails */ public void rollbackTransactions(int channelId) throws JMException @@ -165,6 +179,7 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed * Creates the list of channels in tabular form from the _channelMap. * * @return list of channels in tabular form. + * * @throws OpenDataException */ public TabularData channels() throws OpenDataException @@ -175,8 +190,8 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed for (AMQChannel channel : list) { Object[] itemValues = {channel.getChannelId(), channel.isTransactional(), - (channel.getDefaultQueue() != null) ? channel.getDefaultQueue().getName() : null, - channel.getUnacknowledgedMessageMap().size()}; + (channel.getDefaultQueue() != null) ? channel.getDefaultQueue().getName() : null, + channel.getUnacknowledgedMessageMap().size()}; CompositeData channelData = new CompositeDataSupport(_channelType, _channelAtttibuteNames, itemValues); channelsList.put(channelData); @@ -188,25 +203,26 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed /** * closes the connection. The administrator can use this management operation to close connection to free up * resources. + * * @throws JMException */ public void closeConnection() throws JMException { - + // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0) // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. // Be aware of possible changes to parameter order as versions change. final AMQFrame response = ConnectionCloseBody.createAMQFrame(0, - (byte)8, (byte)0, // AMQP version (major, minor) - 0, // classId - 0, // methodId - AMQConstant.REPLY_SUCCESS.getCode(), // replyCode - "Broker Management Console has closing the connection." // replyText - ); + (byte) 8, (byte) 0, // AMQP version (major, minor) + 0, // classId + 0, // methodId + AMQConstant.REPLY_SUCCESS.getCode(), // replyCode + BROKER_MANAGEMENT_CONSOLE_HAS_CLOSED_THE_CONNECTION // replyText + ); _session.writeFrame(response); try - { + { _session.closeSession(); } catch (AMQException ex) @@ -229,7 +245,7 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed public void notifyClients(String notificationMsg) { Notification n = new Notification(MonitorNotification.THRESHOLD_VALUE_EXCEEDED, this, - ++_notificationSequenceNumber, System.currentTimeMillis(), notificationMsg); + ++_notificationSequenceNumber, System.currentTimeMillis(), notificationMsg); _broadcaster.sendNotification(n); } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java index f5ecf6ba55..6211d7f349 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java @@ -37,10 +37,7 @@ import javax.management.monitor.MonitorNotification; import java.util.List; import java.util.ArrayList; -/** - * MBean class for AMQQueue. It implements all the management features exposed - * for an AMQQueue. - */ +/** MBean class for AMQQueue. It implements all the management features exposed for an AMQQueue. */ @MBeanDescription("Management Interface for AMQQueue") public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, QueueNotificationListener { @@ -84,9 +81,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que } } - /** - * initialises the openmbean data types - */ + /** initialises the openmbean data types */ private static void init() throws OpenDataException { _msgContentAttributeTypes[0] = SimpleType.LONG; // For message id @@ -135,6 +130,16 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que return _queue.getMessageCount(); } + public Long getMaximumMessageAge() + { + return _queue.getMaximumMessageAge(); + } + + public void setMaximumMessageAge(Long maximumMessageAge) + { + _queue.setMaximumMessageAge(maximumMessageAge); + } + public Long getMaximumMessageSize() { return _queue.getMaximumMessageSize(); @@ -180,9 +185,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que _queue.setMaximumQueueDepth(value); } - /** - * returns the size of messages(KB) in the queue. - */ + /** returns the size of messages(KB) in the queue. */ public Long getQueueDepth() { // List list = _queue.getMessagesOnTheQueue(); @@ -203,9 +206,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que return 0L; } - /** - * returns size of message in bytes - */ + /** returns size of message in bytes */ private long getMessageSize(AMQMessage msg) { if (msg == null) @@ -216,9 +217,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que return msg.getContentHeaderBody().bodySize; } - /** - * Checks if there is any notification to be send to the listeners - */ + /** Checks if there is any notification to be send to the listeners */ public void checkForNotification(AMQMessage msg) { final long currentTime = System.currentTimeMillis(); @@ -236,9 +235,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que } } - /** - * Sends the notification to the listeners - */ + /** Sends the notification to the listeners */ public void notifyClients(NotificationCheck notification, AMQQueue queue, String notificationMsg) { // important : add log to the log file - monitoring tools may be looking for this @@ -250,9 +247,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que _broadcaster.sendNotification(n); } - /** - * @see org.apache.qpid.server.queue.AMQQueue#deleteMessageFromTop() - */ + /** @see org.apache.qpid.server.queue.AMQQueue#deleteMessageFromTop() */ public void deleteMessageFromTop() throws JMException { try @@ -265,9 +260,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que } } - /** - * @see org.apache.qpid.server.queue.AMQQueue#clearQueue() - */ + /** @see org.apache.qpid.server.queue.AMQQueue#clearQueue() */ public void clearQueue() throws JMException { try @@ -280,9 +273,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que } } - /** - * returns message content as byte array and related attributes for the given message id. - */ + /** returns message content as byte array and related attributes for the given message id. */ public CompositeData viewMessageContent(long msgId) throws JMException { AMQMessage msg = _queue.getMessageOnTheQueue(msgId); @@ -321,9 +312,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que return new CompositeDataSupport(_msgContentType, _msgContentAttributes, itemValues); } - /** - * Returns the header contents of the messages stored in this queue in tabular form. - */ + /** Returns the header contents of the messages stored in this queue in tabular form. */ public TabularData viewMessages(int beginIndex, int endIndex) throws JMException { if ((beginIndex > endIndex) || (beginIndex < 1)) @@ -351,9 +340,7 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que return _messageList; } - /** - * returns Notifications sent by this MBean. - */ + /** returns Notifications sent by this MBean. */ @Override public MBeanNotificationInfo[] getNotificationInfo() { diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java index 9efeb8351c..2b12b8e14c 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java @@ -37,9 +37,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; -/** - * Manages delivery of messages on behalf of a queue - */ +/** Manages delivery of messages on behalf of a queue */ public class ConcurrentSelectorDeliveryManager implements DeliveryManager { private static final Logger _log = Logger.getLogger(ConcurrentSelectorDeliveryManager.class); @@ -47,34 +45,26 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager @Configured(path = "advanced.compressBufferOnQueue", defaultValue = "false") public boolean compressBufferOnQueue; - /** - * Holds any queued messages - */ + /** Holds any queued messages */ private final Queue _messages = new ConcurrentLinkedQueueAtomicSize(); //private int _messageCount; - /** - * Ensures that only one asynchronous task is running for this manager at - * any time. - */ + /** Ensures that only one asynchronous task is running for this manager at any time. */ private final AtomicBoolean _processing = new AtomicBoolean(); - /** - * The subscriptions on the queue to whom messages are delivered - */ + /** The subscriptions on the queue to whom messages are delivered */ private final SubscriptionManager _subscriptions; /** - * A reference to the queue we are delivering messages for. We need this to be able - * to pass the code that handles acknowledgements a handle on the queue. + * A reference to the queue we are delivering messages for. We need this to be able to pass the code that handles + * acknowledgements a handle on the queue. */ private final AMQQueue _queue; /** * Lock used to ensure that an channel that becomes unsuspended during the start of the queueing process is forced - * to wait till the first message is added to the queue. This will ensure that the _queue has messages to be delivered - * via the async thread. - *

- * Lock is used to control access to hasQueuedMessages() and over the addition of messages to the queue. + * to wait till the first message is added to the queue. This will ensure that the _queue has messages to be + * delivered via the async thread.

Lock is used to control access to hasQueuedMessages() and over the addition + * of messages to the queue. */ private ReentrantLock _lock = new ReentrantLock(); private AtomicLong _totalMessageSize = new AtomicLong(); @@ -135,8 +125,8 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager } /** - * This is an EXPENSIVE opperation to perform with a ConcurrentLinkedQueue as it must run the queue to determine size. - * The ConcurrentLinkedQueueAtomicSize uses an AtomicInteger to record the number of elements on the queue. + * This is an EXPENSIVE opperation to perform with a ConcurrentLinkedQueue as it must run the queue to determine + * size. The ConcurrentLinkedQueueAtomicSize uses an AtomicInteger to record the number of elements on the queue. * * @return int the number of messages in the delivery queue. */ @@ -248,8 +238,8 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager } /** - * Only one thread should ever execute this method concurrently, but - * it can do so while other threads invoke deliver(). + * Only one thread should ever execute this method concurrently, but it can do so while other threads invoke + * deliver(). */ private void processQueue() { diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java index de5d0f55a7..5d5997431b 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java @@ -112,6 +112,21 @@ public interface ManagedQueue @MBeanAttribute(name="AutoDelete", description = "true if the AMQQueue is AutoDelete") boolean isAutoDelete() throws IOException; + /** + * Returns the maximum age of a message (expiration time) + * @return the maximum age + * @throws IOException + */ + Long getMaximumMessageAge() throws IOException; + + /** + * Sets the maximum age of a message + * @param age maximum age of message. + * @throws IOException + */ + @MBeanAttribute(name="MaximumMessageAge", description="Threshold high value for message age on thr broker") + void setMaximumMessageAge(Long age) throws IOException; + /** * Returns the maximum size of a message (in kbytes) allowed to be accepted by the * ManagedQueue. This is useful in setting notifications or taking diff --git a/qpid/java/management/eclipse-plugin/pom.xml b/qpid/java/management/eclipse-plugin/pom.xml index 71b2a08058..f08be66b87 100644 --- a/qpid/java/management/eclipse-plugin/pom.xml +++ b/qpid/java/management/eclipse-plugin/pom.xml @@ -209,6 +209,9 @@ org.apache.maven.plugins maven-surefire-plugin + + true + diff --git a/qpid/java/systests/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java b/qpid/java/systests/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java index 21ad1b6a7f..a89f79dbe4 100644 --- a/qpid/java/systests/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java +++ b/qpid/java/systests/src/test/java/org/apache/qpid/server/AMQBrokerManagerMBeanTest.java @@ -31,18 +31,18 @@ public class AMQBrokerManagerMBeanTest extends TestCase public void testExchangeOperations() throws Exception { - String exchange1 = "testExchange1_" + System.currentTimeMillis(); - String exchange2 = "testExchange2_" + System.currentTimeMillis(); - String exchange3 = "testExchange3_" + System.currentTimeMillis(); + String exchange1 = "testExchange1_" + System.currentTimeMillis(); + String exchange2 = "testExchange2_" + System.currentTimeMillis(); + String exchange3 = "testExchange3_" + System.currentTimeMillis(); assertTrue(_exchangeRegistry.getExchange(exchange1) == null); assertTrue(_exchangeRegistry.getExchange(exchange2) == null); assertTrue(_exchangeRegistry.getExchange(exchange3) == null); ManagedBroker mbean = new AMQBrokerManagerMBean(); - mbean.createNewExchange(exchange1,"direct",false, false); - mbean.createNewExchange(exchange2,"topic",false, false); - mbean.createNewExchange(exchange3,"headers",false, false); + mbean.createNewExchange(exchange1, "direct", false, false); + mbean.createNewExchange(exchange2, "topic", false, false); + mbean.createNewExchange(exchange3, "headers", false, false); assertTrue(_exchangeRegistry.getExchange(exchange1) != null); assertTrue(_exchangeRegistry.getExchange(exchange2) != null); @@ -63,8 +63,8 @@ public class AMQBrokerManagerMBeanTest extends TestCase ManagedBroker mbean = new AMQBrokerManagerMBean(); assertTrue(_queueRegistry.getQueue(queueName) == null); - - mbean.createNewQueue(queueName, false, "test", true); + + mbean.createNewQueue(queueName, "test", false, true); assertTrue(_queueRegistry.getQueue(queueName) != null); mbean.deleteQueue(queueName); @@ -76,7 +76,7 @@ public class AMQBrokerManagerMBeanTest extends TestCase { super.setUp(); IApplicationRegistry appRegistry = ApplicationRegistry.getInstance(); - _queueRegistry = appRegistry.getQueueRegistry(); + _queueRegistry = appRegistry.getQueueRegistry(); _exchangeRegistry = appRegistry.getExchangeRegistry(); } } -- cgit v1.2.1