You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2007/08/01 00:34:22 UTC

svn commit: r561578 [2/6] - in /incubator/qpid/trunk/qpid/java: ./ broker/ broker/bin/ broker/distribution/src/main/assembly/ broker/etc/ broker/src/main/java/org/apache/log4j/ broker/src/main/java/org/apache/qpid/configuration/ broker/src/main/java/or...

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java Tue Jul 31 15:34:12 2007
@@ -33,6 +33,7 @@
 import javax.management.JMException;
 
 import org.apache.log4j.Logger;
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.configuration.Configured;
 import org.apache.qpid.framing.AMQShortString;
@@ -45,11 +46,11 @@
 import org.apache.qpid.server.messageStore.StorableMessage;
 import org.apache.qpid.server.messageStore.StorableQueue;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.StoreContext;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
 import javax.management.JMException;
+
 import java.text.MessageFormat;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -162,22 +163,22 @@
     }
 
     public AMQQueue(AMQShortString name, boolean durable, AMQShortString owner, boolean autoDelete, VirtualHost virtualHost)
-            throws AMQException
+        throws AMQException
     {
         this(name, durable, owner, autoDelete, virtualHost, AsyncDeliveryConfig.getAsyncDeliveryExecutor(),
-             new SubscriptionSet(), new SubscriptionImpl.Factory());
+            new SubscriptionSet(), new SubscriptionImpl.Factory());
     }
 
     protected AMQQueue(AMQShortString name, boolean durable, AMQShortString owner, boolean autoDelete,
-                       VirtualHost virtualHost, SubscriptionSet subscribers) throws AMQException
+        VirtualHost virtualHost, SubscriptionSet subscribers) throws AMQException
     {
         this(name, durable, owner, autoDelete, virtualHost, AsyncDeliveryConfig.getAsyncDeliveryExecutor(), subscribers,
-             new SubscriptionImpl.Factory());
+            new SubscriptionImpl.Factory());
     }
 
     protected AMQQueue(AMQShortString name, boolean durable, AMQShortString owner, boolean autoDelete,
-                       VirtualHost virtualHost, Executor asyncDelivery, SubscriptionSet subscribers,
-                       SubscriptionFactory subscriptionFactory) throws AMQException
+        VirtualHost virtualHost, Executor asyncDelivery, SubscriptionSet subscribers,
+        SubscriptionFactory subscriptionFactory) throws AMQException
     {
         if (name == null)
         {
@@ -259,7 +260,7 @@
     }
 
     /**
-     * Returns messages within the given range of message Ids.
+     * Returns messages within the given range of message Ids
      *
      * @param fromMessageId
      * @param toMessageId
@@ -291,220 +292,38 @@
     }
 
     /**
-     * Moves messages from this queue to another queue, and also commits the move on the message store. Delivery activity
-     * on the queues being moved between is suspended during the move.
+     * moves messages from this queue to another queue. to do this the approach is following- - setup the queue for
+     * moving messages (stop the async delivery) - get all the messages available in the given message id range - setup
+     * the other queue for moving messages (stop the async delivery) - send these available messages to the other queue
+     * (enqueue in other queue) - Once sending to other Queue is successful, remove messages from this queue - remove
+     * locks from both queues and start async delivery
      *
-     * @param fromMessageId The first message id to move.
-     * @param toMessageId   The last message id to move.
-     * @param queueName     The queue to move the messages to.
-     * @param storeContext  The context of the message store under which to perform the move. This is associated with
-     *                      the stores transactional context.
+     * @param fromMessageId
+     * @param toMessageId
+     * @param queueName
+     * @param storeContext
      */
     public synchronized void moveMessagesToAnotherQueue(long fromMessageId, long toMessageId, String queueName,
-                                                        StoreContext storeContext)
-    {
-        AMQQueue toQueue = getVirtualHost().getQueueRegistry().getQueue(new AMQShortString(queueName));
-
-        MessageStore fromStore = getVirtualHost().getMessageStore();
-        MessageStore toStore = toQueue.getVirtualHost().getMessageStore();
-
-        if (toStore != fromStore)
-        {
-            throw new RuntimeException("Can only move messages between queues on the same message store.");
-        }
-
-        try
-        {
-            // Obtain locks to prevent activity on the queues being moved between.
-            startMovingMessages();
-            toQueue.startMovingMessages();
-
-            // Get the list of messages to move.
-            List<AMQMessage> foundMessagesList = getMessagesOnTheQueue(fromMessageId, toMessageId);
-
-            try
-            {
-                fromStore.beginTran(storeContext);
-
-                // Move the messages in on the message store.
-                for (AMQMessage message : foundMessagesList)
-                {
-                    fromStore.dequeueMessage(storeContext, _name, message.getMessageId());
-                    toStore.enqueueMessage(storeContext, toQueue._name, message.getMessageId());
-                }
-
-                // Commit and flush the move transcations.
-                try
-                {
-                    fromStore.commitTran(storeContext);
-                }
-                catch (AMQException e)
-                {
-                    throw new RuntimeException("Failed to commit transaction whilst moving messages on message store.", e);
-                }
-
-                // Move the messages on the in-memory queues.
-                toQueue.enqueueMovedMessages(storeContext, foundMessagesList);
-                _deliveryMgr.removeMovedMessages(foundMessagesList);
-            }
-            // Abort the move transactions on move failures.
-            catch (AMQException e)
-            {
-                try
-                {
-                    fromStore.abortTran(storeContext);
-                }
-                catch (AMQException ae)
-                {
-                    throw new RuntimeException("Failed to abort transaction whilst moving messages on message store.", ae);
-                }
-            }
-        }
-        // Release locks to allow activity on the queues being moved between to continue.
-        finally
-        {
-            toQueue.stopMovingMessages();
-            stopMovingMessages();
-        }
-    }
-
-    /**
-     * Copies messages on this queue to another queue, and also commits the move on the message store. Delivery activity
-     * on the queues being moved between is suspended during the move.
-     *
-     * @param fromMessageId The first message id to move.
-     * @param toMessageId   The last message id to move.
-     * @param queueName     The queue to move the messages to.
-     * @param storeContext  The context of the message store under which to perform the move. This is associated with
-     *                      the stores transactional context.
-     */
-    public synchronized void copyMessagesToAnotherQueue(long fromMessageId, long toMessageId, String queueName,
-                                                        StoreContext storeContext)
-    {
-        AMQQueue toQueue = getVirtualHost().getQueueRegistry().getQueue(new AMQShortString(queueName));
-
-        MessageStore fromStore = getVirtualHost().getMessageStore();
-        MessageStore toStore = toQueue.getVirtualHost().getMessageStore();
-
-        if (toStore != fromStore)
-        {
-            throw new RuntimeException("Can only move messages between queues on the same message store.");
-        }
-
-        try
-        {
-            // Obtain locks to prevent activity on the queues being moved between.
-            startMovingMessages();
-            toQueue.startMovingMessages();
-
-            // Get the list of messages to move.
-            List<AMQMessage> foundMessagesList = getMessagesOnTheQueue(fromMessageId, toMessageId);
-
-            try
-            {
-                fromStore.beginTran(storeContext);
-
-                // Move the messages in on the message store.
-                for (AMQMessage message : foundMessagesList)
-                {
-                    toStore.enqueueMessage(storeContext, toQueue._name, message.getMessageId());
-                    message.takeReference();
-                }
-
-                // Commit and flush the move transcations.
-                try
-                {
-                    fromStore.commitTran(storeContext);
-                }
-                catch (AMQException e)
-                {
-                    throw new RuntimeException("Failed to commit transaction whilst moving messages on message store.", e);
-                }
-
-                // Move the messages on the in-memory queues.
-                toQueue.enqueueMovedMessages(storeContext, foundMessagesList);
-            }
-            // Abort the move transactions on move failures.
-            catch (AMQException e)
-            {
-                try
-                {
-                    fromStore.abortTran(storeContext);
-                }
-                catch (AMQException ae)
-                {
-                    throw new RuntimeException("Failed to abort transaction whilst moving messages on message store.", ae);
-                }
-            }
-        }
-        // Release locks to allow activity on the queues being moved between to continue.
-        finally
-        {
-            toQueue.stopMovingMessages();
-            stopMovingMessages();
-        }
-    }
-
-    /**
-     * Removes messages from this queue, and also commits the remove on the message store. Delivery activity
-     * on the queues being moved between is suspended during the remove.
-     *
-     * @param fromMessageId The first message id to move.
-     * @param toMessageId   The last message id to move.
-     * @param storeContext  The context of the message store under which to perform the move. This is associated with
-     *                      the stores transactional context.
-     */
-    public synchronized void removeMessagesFromQueue(long fromMessageId, long toMessageId, StoreContext storeContext)
+        StoreContext storeContext)
     {
-        MessageStore fromStore = getVirtualHost().getMessageStore();
-
+        // prepare the delivery manager for moving messages by stopping the async delivery and creating a lock
+        AMQQueue anotherQueue = getVirtualHost().getQueueRegistry().getQueue(new AMQShortString(queueName));
         try
         {
-            // Obtain locks to prevent activity on the queues being moved between.
             startMovingMessages();
-
-            // Get the list of messages to move.
             List<AMQMessage> foundMessagesList = getMessagesOnTheQueue(fromMessageId, toMessageId);
 
-            try
-            {
-                fromStore.beginTran(storeContext);
-
-                // remove the messages in on the message store.
-                for (AMQMessage message : foundMessagesList)
-                {
-                    fromStore.dequeueMessage(storeContext, _name, message.getMessageId());
-                }
-
-                // Commit and flush the move transcations.
-                try
-                {
-                    fromStore.commitTran(storeContext);
-                }
-                catch (AMQException e)
-                {
-                    throw new RuntimeException("Failed to commit transaction whilst moving messages on message store.", e);
-                }
+            // move messages to another queue
+            anotherQueue.startMovingMessages();
+            anotherQueue.enqueueMovedMessages(storeContext, foundMessagesList);
 
-                // remove the messages on the in-memory queues.
-                _deliveryMgr.removeMovedMessages(foundMessagesList);
-            }
-            // Abort the move transactions on move failures.
-            catch (AMQException e)
-            {
-                try
-                {
-                    fromStore.abortTran(storeContext);
-                }
-                catch (AMQException ae)
-                {
-                    throw new RuntimeException("Failed to abort transaction whilst moving messages on message store.", ae);
-                }
-            }
+            // moving is successful, now remove from original queue
+            _deliveryMgr.removeMovedMessages(foundMessagesList);
         }
-        // Release locks to allow activity on the queues being moved between to continue.
         finally
         {
+            // remove the lock and start the async delivery
+            anotherQueue.stopMovingMessages();
             stopMovingMessages();
         }
     }
@@ -639,7 +458,7 @@
     }
 
     public void registerProtocolSession(AMQProtocolSession ps, int channel, AMQShortString consumerTag, boolean acks,
-                                        FieldTable filters, boolean noLocal, boolean exclusive) throws AMQException
+        FieldTable filters, boolean noLocal, boolean exclusive) throws AMQException
     {
         if (incrementSubscriberCount() > 1)
         {
@@ -662,12 +481,13 @@
 
         if (_logger.isDebugEnabled())
         {
-            _logger.debug(MessageFormat.format("Registering protocol session {0} with channel {1} and "
-                                               + "consumer tag {2} with {3}", ps, channel, consumerTag, this));
+            _logger.debug(MessageFormat.format(
+                    "Registering protocol session {0} with channel {1} and " + "consumer tag {2} with {3}", ps, channel,
+                    consumerTag, this));
         }
 
         Subscription subscription =
-                _subscriptionFactory.createSubscription(channel, ps, consumerTag, acks, filters, noLocal, this);
+            _subscriptionFactory.createSubscription(channel, ps, consumerTag, acks, filters, noLocal, this);
 
         if (subscription.filtersMessages())
         {
@@ -705,8 +525,8 @@
         if (_logger.isDebugEnabled())
         {
             _logger.debug(MessageFormat.format(
-                    "Unregistering protocol session {0} with channel {1} and consumer tag {2} from {3}",
-                    ps, channel, consumerTag, this));
+                    "Unregistering protocol session {0} with channel {1} and consumer tag {2} from {3}", ps, channel,
+                    consumerTag, this));
         }
 
         Subscription removedSubscription;

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java Tue Jul 31 15:34:12 2007
@@ -18,23 +18,30 @@
  * under the License.
  *
  */
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 package org.apache.qpid.server.queue;
 
-import org.apache.log4j.Logger;
-
-import org.apache.mina.common.ByteBuffer;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
-import org.apache.qpid.framing.CommonContentHeaderProperties;
-import org.apache.qpid.framing.ContentHeaderBody;
-import org.apache.qpid.framing.abstraction.ContentChunk;
-import org.apache.qpid.server.management.AMQManagedObject;
-import org.apache.qpid.server.management.MBeanConstructor;
-import org.apache.qpid.server.management.MBeanDescription;
-import org.apache.qpid.server.management.ManagedObject;
-import org.apache.qpid.server.store.StoreContext;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
 
 import javax.management.JMException;
 import javax.management.MBeanException;
@@ -53,25 +60,30 @@
 import javax.management.openmbean.TabularDataSupport;
 import javax.management.openmbean.TabularType;
 
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
+import org.apache.log4j.Logger;
+
+import org.apache.mina.common.ByteBuffer;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.framing.BasicContentHeaderProperties;
+import org.apache.qpid.framing.CommonContentHeaderProperties;
+import org.apache.qpid.framing.ContentHeaderBody;
+import org.apache.qpid.framing.abstraction.ContentChunk;
+import org.apache.qpid.server.management.AMQManagedObject;
+import org.apache.qpid.server.management.MBeanConstructor;
+import org.apache.qpid.server.management.MBeanDescription;
+import org.apache.qpid.server.management.ManagedObject;
+import org.apache.qpid.server.store.StoreContext;
 
 /**
- * AMQQueueMBean is the management bean for an {@link AMQQueue}.
- *
- * <p/><tablse id="crc"><caption>CRC Caption</caption>
- * <tr><th> Responsibilities <th> Collaborations
- * </table>
+ * 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
 {
-    /** Used for debugging purposes. */
     private static final Logger _logger = Logger.getLogger(AMQQueueMBean.class);
-
     private static final SimpleDateFormat _dateFormat = new SimpleDateFormat("MM-dd-yy HH:mm:ss.SSS z");
 
     /**

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java Tue Jul 31 15:34:12 2007
@@ -20,6 +20,19 @@
  */
 package org.apache.qpid.server.queue;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Queue;
+import java.util.Set;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.Executor;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantLock;
+
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.configuration.Configured;
@@ -29,21 +42,8 @@
 import org.apache.qpid.server.configuration.Configurator;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.store.StoreContext;
-import org.apache.qpid.util.ConcurrentLinkedMessageQueueAtomicSize;
 import org.apache.qpid.util.MessageQueue;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.ReentrantLock;
+import org.apache.qpid.util.ConcurrentLinkedMessageQueueAtomicSize;
 
 
 /** Manages delivery of messages on behalf of a queue */
@@ -87,10 +87,6 @@
     private final Object _queueHeadLock = new Object();
     private String _processingThreadName = "";
 
-
-    /** Used by any reaping thread to purge messages */
-    private StoreContext _reapingStoreContext = new StoreContext();
-
     ConcurrentSelectorDeliveryManager(SubscriptionManager subscriptions, AMQQueue queue)
     {
 
@@ -457,31 +453,12 @@
         //while (we have a message) && ((The subscriber is not a browser or message is taken ) or we are clearing) && (Check message is taken.)
         while (purgeMessage(message, sub))
         {
-            // if we are purging then ensure we mark this message taken for the current subscriber
-            // the current subscriber may be null in the case of a get or a purge but this is ok.
-//            boolean alreadyTaken = message.taken(_queue, sub);
-
             //remove the already taken message or expired
             AMQMessage removed = messages.poll();
 
             assert removed == message;
 
-            // if the message expired then the _totalMessageSize needs adjusting
-            if (message.expired(_queue))
-            {
-                _totalMessageSize.addAndGet(-message.getSize());
-
-                // Use the reapingStoreContext as any sub(if we have one) may be in a tx.
-                message.dequeue(_reapingStoreContext, _queue);
-
-                if (_log.isInfoEnabled())
-                {
-                    _log.info(debugIdentity() + " Doing clean up of the main _message queue.");
-                }
-            }
-
-            //else the clean up is not required as the message has already been taken for this queue therefore
-            // it was the responsibility of the code that took the message to ensure the _totalMessageSize was updated.
+            _totalMessageSize.addAndGet(-message.getSize());
 
             if (_log.isTraceEnabled())
             {
@@ -496,10 +473,7 @@
     }
 
     /**
-     *  This method will return true if the message is to be purged from the queue.
-     *
-     *
-     *  SIDE-EFFECT: The message will be taken by the Subscription(sub) for the current Queue(_queue)
+     * 
      * @param message
      * @param sub
      * @return
@@ -519,15 +493,15 @@
         // if the message is null then don't purge as we have no messagse.
         if (message != null)
         {
-            // Check that the message hasn't expired.
-            if (message.expired(_queue))
-            {
-                return true;
-            }
-
             // if we have a subscriber perform message checks
             if (sub != null)
             {
+                // Check that the message hasn't expired.
+                if (message.expired(sub.getChannel().getStoreContext(), _queue))
+                {
+                    return true;
+                }
+
                 // if we have a queue browser(we don't purge) so check mark the message as taken
                 purge = ((!sub.isBrowser() || message.isTaken(_queue)));
             }
@@ -632,10 +606,7 @@
             {
                 if (_log.isInfoEnabled())
                 {
-                    //fixme - we should do the clean up as the message remains on the _message queue
-                    // this is resulting in the next consumer receiving the message and then attempting to purge it
-                    //
-                    _log.info(debugIdentity() + "We should do clean up of the main _message queue here");
+                    _log.info(debugIdentity() + "We could do clean up of the main _message queue here");
                 }
             }
 
@@ -646,14 +617,7 @@
         }
         catch (AMQException e)
         {
-            if (message != null)
-            {
-                message.release(_queue);
-            }
-            else
-            {
-                _log.error(debugIdentity() + "Unable to release message as it is null. " + e, e);
-            }
+            message.release(_queue);
             _log.error(debugIdentity() + "Unable to deliver message as dequeue failed: " + e, e);
         }
     }
@@ -732,6 +696,25 @@
 
     }
 
+//    private void sendNextMessage(Subscription sub)
+//    {
+//        if (sub.filtersMessages())
+//        {
+//            sendNextMessage(sub, sub.getPreDeliveryQueue());
+//            if (sub.isAutoClose())
+//            {
+//                if (sub.getPreDeliveryQueue().isEmpty())
+//                {
+//                    sub.close();
+//                }
+//            }
+//        }
+//        else
+//        {
+//            sendNextMessage(sub, _messages);
+//        }
+//    }
+
     public void deliver(StoreContext context, AMQShortString name, AMQMessage msg, boolean deliverFirst) throws AMQException
     {
 
@@ -740,6 +723,8 @@
         {
             _log.debug(debugIdentity() + "deliver :first(" + deliverFirst + ") :" + msg);
         }
+        // This shouldn't be done here.
+//        msg.release();
 
         //Check if we have someone to deliver the message to.
         _lock.lock();
@@ -815,7 +800,7 @@
                         if (debugEnabled)
                         {
                             _log.debug(debugIdentity() + " Subscription(" + System.identityHashCode(s) + ") became " +
-                                       "suspended between nextSubscriber and send for message:" + msg.debugIdentity());
+                                      "suspended between nextSubscriber and send for message:" + msg.debugIdentity());
                         }
                     }
                 }
@@ -825,7 +810,7 @@
                     if (debugEnabled)
                     {
                         _log.debug(debugIdentity() + " Message(" + msg.debugIdentity() + ") has not been taken so recursing!:" +
-                                   " Subscriber:" + System.identityHashCode(s));
+                                  " Subscriber:" + System.identityHashCode(s));
                     }
 
                     deliver(context, name, msg, deliverFirst);

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java Tue Jul 31 15:34:12 2007
@@ -20,14 +20,13 @@
  */
 package org.apache.qpid.server.queue;
 
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
-import java.util.Collection;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
 public class DefaultQueueRegistry implements QueueRegistry
 {
     private ConcurrentMap<AMQShortString, AMQQueue> _queueMap = new ConcurrentHashMap<AMQShortString, AMQQueue>();
@@ -57,15 +56,5 @@
     public AMQQueue getQueue(AMQShortString name)
     {
         return _queueMap.get(name);
-    }
-
-    public Collection<AMQShortString> getQueueNames()
-    {
-        return _queueMap.keySet();
-    }
-
-    public Collection<AMQQueue> getQueues()
-    {
-        return _queueMap.values();
     }
 }

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ExchangeBindings.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ExchangeBindings.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ExchangeBindings.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ExchangeBindings.java Tue Jul 31 15:34:12 2007
@@ -46,7 +46,7 @@
 
         ExchangeBinding(AMQShortString routingKey, Exchange exchange)
         {
-            this(routingKey, exchange, EMPTY_ARGUMENTS);
+            this(routingKey, exchange,EMPTY_ARGUMENTS);
         }
 
         ExchangeBinding(AMQShortString routingKey, Exchange exchange, FieldTable arguments)
@@ -80,10 +80,7 @@
 
         public boolean equals(Object o)
         {
-            if (!(o instanceof ExchangeBinding))
-            {
-                return false;
-            }
+            if (!(o instanceof ExchangeBinding)) return false;
             ExchangeBinding eb = (ExchangeBinding) o;
             return _exchange.equals(eb._exchange)
                    && _routingKey.equals(eb._routingKey)
@@ -107,16 +104,16 @@
      */
     void addBinding(AMQShortString routingKey, FieldTable arguments, Exchange exchange)
     {
-        _bindings.add(new ExchangeBinding(routingKey, exchange, arguments));
+        _bindings.add(new ExchangeBinding(routingKey, exchange, arguments ));
     }
 
 
     public void remove(AMQShortString routingKey, FieldTable arguments, Exchange exchange)
     {
-        _bindings.remove(new ExchangeBinding(routingKey, exchange, arguments));
+        _bindings.remove(new ExchangeBinding(routingKey, exchange, arguments ));
     }
 
-
+    
     /**
      * Deregisters this queue from any exchange it has been bound to
      */

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/MessageMetaData.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/MessageMetaData.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/MessageMetaData.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/MessageMetaData.java Tue Jul 31 15:34:12 2007
@@ -1,22 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.apache.qpid.server.queue;
 

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.queue;

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueNotificationListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueNotificationListener.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueNotificationListener.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueNotificationListener.java Tue Jul 31 15:34:12 2007
@@ -1,25 +1,21 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.queue;
-
 
 public interface QueueNotificationListener
 {

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java Tue Jul 31 15:34:12 2007
@@ -25,7 +25,6 @@
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.messageStore.StorableQueue;
 
-import java.util.Collection;
 
 public interface QueueRegistry
 {
@@ -36,9 +35,4 @@
     void unregisterQueue(AMQShortString name) throws AMQException;
 
     AMQQueue getQueue(AMQShortString name);
-
-    Collection<AMQShortString> getQueueNames();
-
-    Collection<AMQQueue> getQueues();
-
 }

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/TransientMessageData.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/TransientMessageData.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/TransientMessageData.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/TransientMessageData.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.queue;

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/NonTransactionalContext.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/NonTransactionalContext.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/NonTransactionalContext.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/NonTransactionalContext.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.txn;

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java Tue Jul 31 15:34:12 2007
@@ -28,144 +28,24 @@
 import org.apache.qpid.server.store.StoreContext;
 
 /**
- * TransactionalContext provides a context in which transactional operations on {@link AMQMessage}s are performed.
- * Different levels of transactional support for the delivery of messages may be provided by different implementations
- * of this interface.
- *
- * <p/>The fundamental transactional operations that can be performed on a message queue are 'enqueue' and 'dequeue'.
- * In this interface, these have been recast as the {@link #messageFullyReceived} and {@link #acknowledgeMessage}
- * operations. This interface essentially provides a way to make enqueueing and dequeuing transactional.
- *
- * <p/><table id="crc"><caption>CRC Card</caption>
- * <tr><th> Responsibilities
- * <tr><td> Explicitly accept a transaction start notification.
- * <tr><td> Commit all pending operations in a transaction.
- * <tr><td> Rollback all pending operations in a transaction.
- * <tr><td> Deliver a message to a queue as part of a transaction.
- * <tr><td> Redeliver a message to a queue as part of a transaction.
- * <tr><td> Mark a message as acknowledged as part of a transaction.
- * <tr><td> Accept notification that a message has been completely received as part of a transaction.
- * <tr><td> Accept notification that a message has been fully processed as part of a transaction.
- * <tr><td> Associate a message store context with this transaction context.
- * </table>
- *
- * @todo The 'fullyReceived' and 'messageProcessed' events sit uncomfortably in the responsibilities of a transactional
- *       context. They are non-transactional operations, used to trigger other side-effects. Consider moving them
- *       somewhere else, a seperate interface for example.
- *
- * @todo This transactional context could be written as a wrapper extension to a Queue implementation, that provides
- *       transactional management of the enqueue and dequeue operations, with added commit/rollback methods. Any
- *       queue implementation could be made transactional by wrapping it as a transactional queue. This would mean
- *       that the enqueue/dequeue operations do not need to be recast as deliver/acknowledge operations, which may be
- *       conceptually neater.
- *
- * For example:
- * <pre>
- * public interface Transactional
- * {
- *    public void commit();
- *    public void rollback();
- * }
- *
- * public interface TransactionalQueue<E> extends Transactional, SizeableQueue<E>
- * {}
- *
- * public class Queues
- * {
- *    ...
- *    // For transactional messaging, take a transactional view onto the queue.
- *    public static <E> TransactionalQueue<E> getTransactionalQueue(SizeableQueue<E> queue) { ... }
- *
- *    // For non-transactional messaging, take a non-transactional view onto the queue.
- *    public static <E> TransactionalQueue<E> getNonTransactionalQueue(SizeableQueue<E> queue) { ... }
- * }
- * </pre>
+ * @author Robert Greig (robert.j.greig@jpmorgan.com)
  */
 public interface TransactionalContext
 {
-    /**
-     * Explicitly begins the transaction, if it has not already been started. {@link #commit} or {@link #rollback}
-     * should automatically begin the next transaction in the chain.
-     *
-     * @throws AMQException If the transaction cannot be started for any reason.
-     */
     void beginTranIfNecessary() throws AMQException;
 
-    /**
-     * Makes all pending operations on the transaction permanent and visible.
-     *
-     * @throws AMQException If the transaction cannot be committed for any reason.
-     */
     void commit() throws AMQException;
 
-    /**
-     * Erases all pending operations on the transaction.
-     *
-     * @throws AMQException If the transaction cannot be committed for any reason.
-     */
     void rollback() throws AMQException;
 
-    /**
-     * Delivers the specified message to the specified queue. A 'deliverFirst' flag may be set if the message is a
-     * redelivery, and should be placed on the front of the queue.
-     *
-     * <p/>This is an 'enqueue' operation.
-     *
-     * @param message      The message to deliver.
-     * @param queue        The queue to deliver the message to.
-     * @param deliverFirst <tt>true</tt> to place the message on the front of the queue for redelivery, <tt>false</tt>
-     *                     for normal FIFO message ordering.
-     *
-     * @throws AMQException If the message cannot be delivered for any reason.
-     */
     void deliver(AMQMessage message, AMQQueue queue, boolean deliverFirst) throws AMQException;
 
-    /**
-     * Acknowledges a message or many messages as delivered. All messages up to a specified one, may be acknowledged by
-     * setting the 'multiple' flag. It is also possible for the acknowledged message id to be zero, when the 'multiple'
-     * flag is set, in which case an acknowledgement up to the latest delivered message should be done.
-     *
-     * <p/>This is a 'dequeue' operation.
-     *
-     * @param deliveryTag              The id of the message to acknowledge, or zero, if using multiple acknowledgement
-     *                                 up to the latest message.
-     * @param lastDeliveryTag          The latest message delivered.
-     * @param multiple                 <tt>true</tt> if all message ids up the acknowledged one or latest delivered, are
-     *                                 to be acknowledged, <tt>false</tt> otherwise.
-     * @param unacknowledgedMessageMap The unacknowledged messages in the transaction, to remove the acknowledged message
-     *                                 from.
-     *
-     * @throws AMQException If the message cannot be acknowledged for any reason.
-     */
     void acknowledgeMessage(long deliveryTag, long lastDeliveryTag, boolean multiple,
-        UnacknowledgedMessageMap unacknowledgedMessageMap) throws AMQException;
+                            UnacknowledgedMessageMap unacknowledgedMessageMap) throws AMQException;
 
-    /**
-     * Notifies the transactional context that a message has been fully received. The actual message that was received
-     * is not specified. This event may be used to trigger a process related to the receipt of the message, for example,
-     * flushing its data to disk.
-     *
-     * @param persistent <tt>true</tt> if the received message is persistent, <tt>false</tt> otherwise.
-     *
-     * @throws AMQException If the fully received event cannot be processed for any reason.
-     */
     void messageFullyReceived(boolean persistent) throws AMQException;
 
-    /**
-     * Notifies the transactional context that a message has been delivered, succesfully or otherwise. The actual
-     * message that was delivered is not specified. This event may be used to trigger a process related to the
-     * outcome of the delivery of the message, for example, cleaning up failed deliveries.
-     *
-     * @param protocolSession The protocol session of the deliverable message.
-     *
-     * @throws AMQException If the message processed event cannot be handled for any reason.
-     */
     void messageProcessed(AMQProtocolSession protocolSession) throws AMQException;
 
-    /**
-     * Gets the message store context associated with this transactional context.
-     *
-     * @return The message store context associated with this transactional context.
-     */
     StoreContext getStoreContext();
 }

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java Tue Jul 31 15:34:12 2007
@@ -1,4 +1,3 @@
-<<<<<<< .working
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -287,264 +286,3 @@
     }
 }
 
-=======
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.virtualhost;
-
-import javax.management.NotCompliantMBeanException;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.log4j.Logger;
-import org.apache.qpid.server.AMQBrokerManagerMBean;
-import org.apache.qpid.server.security.access.AccessManager;
-import org.apache.qpid.server.security.access.AccessManagerImpl;
-import org.apache.qpid.server.security.access.Accessable;
-import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
-import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
-import org.apache.qpid.server.configuration.Configurator;
-import org.apache.qpid.server.exchange.DefaultExchangeFactory;
-import org.apache.qpid.server.exchange.DefaultExchangeRegistry;
-import org.apache.qpid.server.exchange.ExchangeFactory;
-import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.management.AMQManagedObject;
-import org.apache.qpid.server.management.ManagedObject;
-import org.apache.qpid.server.queue.DefaultQueueRegistry;
-import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.store.MessageStore;
-
-public class VirtualHost implements Accessable
-{
-    private static final Logger _logger = Logger.getLogger(VirtualHost.class);
-
-
-    private final String _name;
-
-    private QueueRegistry _queueRegistry;
-
-    private ExchangeRegistry _exchangeRegistry;
-
-    private ExchangeFactory _exchangeFactory;
-
-    private MessageStore _messageStore;
-
-    protected VirtualHostMBean _virtualHostMBean;
-
-    private AMQBrokerManagerMBean _brokerMBean;
-
-    private AuthenticationManager _authenticationManager;
-
-    private AccessManager _accessManager;
-
-
-    public void setAccessableName(String name)
-    {
-        _logger.warn("Setting Accessable Name for VirualHost is not allowed. ("
-                     + name + ") ignored remains :" + getAccessableName());
-    }
-
-    public String getAccessableName()
-    {
-        return _name;
-    }
-
-
-    /**
-     * Abstract MBean class. This has some of the methods implemented from management intrerface for exchanges. Any
-     * implementaion of an Exchange MBean should extend this class.
-     */
-    public class VirtualHostMBean extends AMQManagedObject implements ManagedVirtualHost
-    {
-        public VirtualHostMBean() throws NotCompliantMBeanException
-        {
-            super(ManagedVirtualHost.class, "VirtualHost");
-        }
-
-        public String getObjectInstanceName()
-        {
-            return _name.toString();
-        }
-
-        public String getName()
-        {
-            return _name.toString();
-        }
-
-        public VirtualHost getVirtualHost()
-        {
-            return VirtualHost.this;
-        }
-
-
-    } // End of MBean class
-
-    /**
-     * Used for testing only
-     * @param name
-     * @param store
-     * @throws Exception
-     */
-    public VirtualHost(String name, MessageStore store) throws Exception
-    {
-        this(name, null, store);
-    }
-
-    /**
-     * Normal Constructor
-     * @param name
-     * @param hostConfig
-     * @throws Exception
-     */
-    public VirtualHost(String name, Configuration hostConfig) throws Exception
-    {
-        this(name, hostConfig, null);
-    }
-
-    private VirtualHost(String name, Configuration hostConfig, MessageStore store) throws Exception
-    {
-        _name = name;
-
-        _virtualHostMBean = new VirtualHostMBean();
-        // This isn't needed to be registered
-        //_virtualHostMBean.register();
-
-        _queueRegistry = new DefaultQueueRegistry(this);
-        _exchangeFactory = new DefaultExchangeFactory(this);
-        _exchangeRegistry = new DefaultExchangeRegistry(this);
-
-        if (store != null)
-        {
-            _messageStore = store;
-        }
-        else
-        {
-            if (hostConfig == null)
-            {
-                throw new IllegalAccessException("HostConfig and MessageStore cannot be null");
-            }
-            initialiseMessageStore(hostConfig);
-        }
-
-        _exchangeRegistry.initialise();
-
-        _authenticationManager = new PrincipalDatabaseAuthenticationManager(name, hostConfig);
-
-        _accessManager = new AccessManagerImpl(name, hostConfig);
-
-        _brokerMBean = new AMQBrokerManagerMBean(_virtualHostMBean);
-        _brokerMBean.register();
-    }
-
-    private void initialiseMessageStore(Configuration config) throws Exception
-    {
-        String messageStoreClass = config.getString("store.class");
-
-        Class clazz = Class.forName(messageStoreClass);
-        Object o = clazz.newInstance();
-
-        if (!(o instanceof MessageStore))
-        {
-            throw new ClassCastException("Message store class must implement " + MessageStore.class + ". Class " + clazz +
-                                         " does not.");
-        }
-        _messageStore = (MessageStore) o;
-        _messageStore.configure(this, "store", config);
-    }
-
-
-    public <T> T getConfiguredObject(Class<T> instanceType, Configuration config)
-    {
-        T instance;
-        try
-        {
-            instance = instanceType.newInstance();
-        }
-        catch (Exception e)
-        {
-            _logger.error("Unable to instantiate configuration class " + instanceType + " - ensure it has a public default constructor");
-            throw new IllegalArgumentException("Unable to instantiate configuration class " + instanceType + " - ensure it has a public default constructor", e);
-        }
-        Configurator.configure(instance);
-
-        return instance;
-    }
-
-
-    public String getName()
-    {
-        return _name;
-    }
-
-    public QueueRegistry getQueueRegistry()
-    {
-        return _queueRegistry;
-    }
-
-    public ExchangeRegistry getExchangeRegistry()
-    {
-        return _exchangeRegistry;
-    }
-
-    public ExchangeFactory getExchangeFactory()
-    {
-        return _exchangeFactory;
-    }
-
-    public ApplicationRegistry getApplicationRegistry()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public MessageStore getMessageStore()
-    {
-        return _messageStore;
-    }
-
-    public AuthenticationManager getAuthenticationManager()
-    {
-        return _authenticationManager;
-    }
-
-    public AccessManager getAccessManager()
-    {
-        return _accessManager;
-    }
-
-    public void close() throws Exception
-    {
-        if (_messageStore != null)
-        {
-            _messageStore.close();
-        }
-    }
-
-    public ManagedObject getBrokerMBean()
-    {
-        return _brokerMBean;
-    }
-
-    public ManagedObject getManagedObject()
-    {
-        return _virtualHostMBean;
-    }
-}
->>>>>>> .merge-right.r553432

Modified: incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.exchange;

Modified: incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/TestMinaProtocolSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/TestMinaProtocolSession.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/TestMinaProtocolSession.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/TestMinaProtocolSession.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.protocol;

Modified: incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.queue;

Modified: incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.server.queue;

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorMessageDispatcher.java Tue Jul 31 15:34:12 2007
@@ -18,18 +18,18 @@
  */
 package org.apache.qpid.example.publisher;
 
-import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.Logger;
+import org.apache.log4j.BasicConfigurator;
+
+import javax.jms.*;
 
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
+import java.util.Properties;
 
 /**
- * Class that sends heartbeat messages to allow monitoring of message consumption Sends regular (currently 20 seconds
- * apart) heartbeat message
+ * Class that sends heartbeat messages to allow monitoring of message consumption
+ * Sends regular (currently 20 seconds apart) heartbeat message
  */
-public class MonitorMessageDispatcher
-{
+public class MonitorMessageDispatcher {
 
     private static final Logger _logger = Logger.getLogger(MonitorMessageDispatcher.class);
 
@@ -39,18 +39,17 @@
 
     /**
      * Easy entry point for running a message dispatcher for monitoring consumption
-     *
      * @param args
      */
     public static void main(String[] args)
     {
+
         //Switch on logging appropriately for your app
         BasicConfigurator.configure();
 
         try
         {
-            int i =0;
-            while (i < 1000)
+            while(true)
             {
                 try
                 {
@@ -63,10 +62,9 @@
                     }
 
                     //sleep for twenty seconds and then publish again - change if appropriate
-                    //Thread.sleep(1000);
-                    i++   ;
+                    Thread.sleep(20000);
                 }
-                catch (UndeliveredMessageException a)
+                catch(UndeliveredMessageException a)
                 {
                     //trigger application specific failure handling here
                     _logger.error("Problem delivering monitor message");
@@ -74,7 +72,7 @@
                 }
             }
         }
-        catch (Exception e)
+        catch(Exception e)
         {
             _logger.error("Error trying to dispatch AMS monitor message: " + e);
             System.exit(1);
@@ -83,7 +81,7 @@
         {
             if (getMonitorPublisher() != null)
             {
-                getMonitorPublisher().cleanup();
+               getMonitorPublisher().cleanup();
             }
         }
 
@@ -92,24 +90,19 @@
 
     /**
      * Publish heartbeat message
-     *
      * @throws JMSException
      * @throws UndeliveredMessageException
      */
     public static void publish() throws JMSException, UndeliveredMessageException
     {
         //Send the message generated from the payload using the _publisher
-//        getMonitorPublisher().sendImmediateMessage
-//          (FileMessageFactory.createSimpleEventMessage(getMonitorPublisher().getSession(),"monitor:" +System.currentTimeMillis()));
-
-        getMonitorPublisher().sendMessage
-                (getMonitorPublisher()._session,
-                 FileMessageFactory.createSimpleEventMessage(getMonitorPublisher().getSession(), "monitor:" + System.currentTimeMillis()),
-                 DeliveryMode.PERSISTENT, false, true);
-
+        getMonitorPublisher().sendImmediateMessage
+          (FileMessageFactory.createSimpleEventMessage(getMonitorPublisher().getSession(),"monitor:" +System.currentTimeMillis()));
     }
 
-    /** Cleanup publishers */
+    /**
+     * Cleanup publishers
+     */
     public static void cleanup()
     {
         if (getMonitorPublisher() != null)
@@ -126,16 +119,16 @@
     //Returns a _publisher for the monitor queue
     private static MonitorPublisher getMonitorPublisher()
     {
-        if (_monitorPublisher != null)
-        {
-            return _monitorPublisher;
-        }
+       if (_monitorPublisher != null)
+       {
+           return _monitorPublisher;
+       }
 
-        //Create a _publisher using failover details and constant for monitor queue
-        _monitorPublisher = new MonitorPublisher();
+       //Create a _publisher using failover details and constant for monitor queue
+       _monitorPublisher = new MonitorPublisher();
 
-        _monitorPublisher.setName(MonitorMessageDispatcher.DEFAULT_MONITOR_PUB_NAME);
-        return _monitorPublisher;
+       _monitorPublisher.setName(MonitorMessageDispatcher.DEFAULT_MONITOR_PUB_NAME);
+       return _monitorPublisher;
     }
 
 }

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/publisher/MonitorPublisher.java Tue Jul 31 15:34:12 2007
@@ -18,17 +18,15 @@
  */
 package org.apache.qpid.example.publisher;
 
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.BasicMessageProducer;
-
+import javax.jms.Message;
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
+import org.apache.qpid.client.BasicMessageProducer;
+import org.apache.log4j.Logger;
 
 /**
- * Subclass of Publisher which uses QPID functionality to send a heartbeat message Note immediate flag not available via
- * JMS MessageProducer
+ * Subclass of Publisher which uses QPID functionality to send a heartbeat message
+ * Note immediate flag not available via JMS MessageProducer
  */
 public class MonitorPublisher extends Publisher
 {
@@ -42,45 +40,14 @@
         super();
     }
 
-    /*
-    * Publishes a message using given details
-    */
-    public boolean sendMessage(Session session, Message message, int deliveryMode,
-                                        boolean immediate, boolean commit) throws UndeliveredMessageException
-    {
-        try
-        {
-            _producer = (BasicMessageProducer) session.createProducer(_destination);
-
-            _producer.send(message, deliveryMode, immediate);
-
-            if (commit)
-            {
-                //commit the message send and close the transaction
-                _session.commit();
-            }
-
-        }
-        catch (JMSException e)
-        {
-            //Have to assume our commit failed but do not rollback here as channel closed
-            _log.error(e);
-            e.printStackTrace();
-            throw new UndeliveredMessageException("Cannot deliver immediate message", e);
-        }
-
-        _log.info(_name + " finished sending message: " + message);
-        return true;
-    }
-
-    /*
-    * Publishes a non-persistent message using transacted session
-    */
+     /*
+     * Publishes a non-persistent message using transacted session
+     */
     public boolean sendImmediateMessage(Message message) throws UndeliveredMessageException
     {
         try
         {
-            _producer = (BasicMessageProducer) _session.createProducer(_destination);
+             _producer = (BasicMessageProducer)_session.createProducer(_destination);
 
             //Send message via our producer which is not persistent and is immediate
             //NB: not available via jms interface MessageProducer
@@ -95,7 +62,7 @@
             //Have to assume our commit failed but do not rollback here as channel closed
             _log.error(e);
             e.printStackTrace();
-            throw new UndeliveredMessageException("Cannot deliver immediate message", e);
+            throw new UndeliveredMessageException("Cannot deliver immediate message",e);
         }
 
         _log.info(_name + " finished sending message: " + message);

Modified: incubator/qpid/trunk/qpid/java/client/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/pom.xml?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/pom.xml (original)
+++ incubator/qpid/trunk/qpid/java/client/pom.xml Tue Jul 31 15:34:12 2007
@@ -123,50 +123,6 @@
 
     <build>
         <plugins>
-
-           <plugin>
-                <artifactId>minijar-maven-plugin</artifactId>
-                <groupId>org.codehaus.mojo</groupId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>ueberjar</goal>
-                        </goals>
-                        <configuration>
-                            <stripUnusedClasses>false</stripUnusedClasses>
-                            <name>[artifactId]-[version]-single.jar</name>
-                            <classifier>single</classifier>
-                            <attach>true</attach>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                  <execution>
-                    <id>attach-artifacts</id>
-                    <phase>package</phase>
-                    <goals>
-                      <goal>attach-artifact</goal>
-                    </goals>
-                    <configuration>
-                        <artifacts>
-                          <artifact>
-                            <file>target/${artifactId}-${version}-single.jar</file>
-                            <type>jar</type>
-                            <classifier>single</classifier>
-                          </artifact>
-                        </artifacts>
-                    </configuration>
-                  </execution>
-                </executions>
-            </plugin>
-
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java Tue Jul 31 15:34:12 2007
@@ -46,6 +46,7 @@
 import org.apache.qpid.jms.FailoverPolicy;
 import org.apache.qpid.protocol.AMQConstant;
 import org.apache.qpid.url.URLSyntaxException;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -67,6 +68,7 @@
 import javax.naming.Reference;
 import javax.naming.Referenceable;
 import javax.naming.StringRefAddr;
+
 import java.io.IOException;
 import java.net.ConnectException;
 import java.nio.channels.UnresolvedAddressException;
@@ -1146,7 +1148,7 @@
         }
         else
         {
-            _logger.info("Not a hard-error connection not closing: " + cause.getMessage());
+            _logger.info("Not a hard-error connection not closing.");
         }
     }
 

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionURL.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionURL.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionURL.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionURL.java Tue Jul 31 15:34:12 2007
@@ -20,14 +20,6 @@
  */
 package org.apache.qpid.client;
 
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.jms.BrokerDetails;
-import org.apache.qpid.jms.ConnectionURL;
-import org.apache.qpid.url.URLHelper;
-import org.apache.qpid.url.URLSyntaxException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.HashMap;
@@ -35,10 +27,14 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.jms.BrokerDetails;
+import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.url.URLHelper;
+import org.apache.qpid.url.URLSyntaxException;
+
 public class AMQConnectionURL implements ConnectionURL
 {
-    private static final Logger _logger = LoggerFactory.getLogger(AMQConnectionURL.class);
-
     private String _url;
     private String _failoverMethod;
     private HashMap<String, String> _failoverOptions;
@@ -166,7 +162,7 @@
                 if ((slash != 0) && (fullURL.charAt(slash - 1) == ':'))
                 {
                     throw URLHelper.parseError(slash - 2, fullURL.indexOf('?') - slash + 2,
-                                               "Virtual host looks like a windows path, forward slash not allowed in URL", fullURL);
+                        "Virtual host looks like a windows path, forward slash not allowed in URL", fullURL);
                 }
                 else
                 {
@@ -186,7 +182,7 @@
         if (colonIndex == -1)
         {
             throw URLHelper.parseError(AMQ_PROTOCOL.length() + 3, userinfo.length(),
-                                       "Null password in user information not allowed.", _url);
+                "Null password in user information not allowed.", _url);
         }
         else
         {
@@ -391,14 +387,7 @@
             if (_password != null)
             {
                 sb.append(':');
-                if (_logger.isDebugEnabled())
-                {
-                    sb.append(_password);
-                }
-                else
-                {
-                    sb.append("********");
-                }
+                sb.append(_password);
             }
 
             sb.append('@');
@@ -443,7 +432,7 @@
     public static void main(String[] args) throws URLSyntaxException
     {
         String url2 =
-                "amqp://ritchiem:bob@temp?brokerlist='tcp://localhost:5672;jcp://fancyserver:3000/',failover='roundrobin'";
+            "amqp://ritchiem:bob@temp?brokerlist='tcp://localhost:5672;jcp://fancyserver:3000/',failover='roundrobin'";
         // "amqp://user:pass@clientid/virtualhost?brokerlist='tcp://host:1?option1=\'value\',option2=\'value\';vm://:3?option1=\'value\'',failover='method?option1=\'value\',option2='value''";
 
         ConnectionURL connectionurl2 = new AMQConnectionURL(url2);

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java Tue Jul 31 15:34:12 2007
@@ -2319,16 +2319,6 @@
         }
     }
 
-    public void declareAndBind(AMQDestination amqd)
-            throws
-            AMQException
-    {
-        AMQProtocolHandler protocolHandler = getProtocolHandler();
-        declareExchange(amqd, protocolHandler, false);
-        AMQShortString queueName = declareQueue(amqd, protocolHandler);
-        bindQueue(queueName, amqd.getRoutingKey(), new FieldTable(), amqd.getExchangeName());
-    }
-
     /**
      * Callers must hold the failover mutex before calling this method.
      *

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.client.handler;

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java?view=diff&rev=561578&r1=561577&r2=561578
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java Tue Jul 31 15:34:12 2007
@@ -1,21 +1,18 @@
 /*
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) 2006 The Apache Software Foundation
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  *
  */
 package org.apache.qpid.client.handler;