qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1562466 [5/6] - in /qpid/branches/java-broker-bdb-ha: ./ qpid/ qpid/cpp/src/ qpid/cpp/src/qpid/client/ qpid/cpp/src/qpid/framing/ qpid/cpp/src/qpid/ha/ qpid/cpp/src/qpid/messaging/amqp/ qpid/cpp/src/tests/ qpid/java/ qpid/java/amqp-1-0-cli...
Date Wed, 29 Jan 2014 14:48:55 GMT
Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java Wed Jan 29 14:48:50 2014
@@ -73,6 +73,8 @@ import org.apache.qpid.protocol.AMQConst
 import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.protocol.AMQMethodListener;
 import org.apache.qpid.protocol.ServerProtocolEngine;
+import org.apache.qpid.server.message.InstanceProperties;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.configuration.BrokerProperties;
 import org.apache.qpid.server.protocol.v0_8.handler.ServerMethodDispatcherImpl;
@@ -88,7 +90,6 @@ import org.apache.qpid.server.model.Port
 import org.apache.qpid.server.model.Transport;
 import org.apache.qpid.server.protocol.v0_8.output.ProtocolOutputConverter;
 import org.apache.qpid.server.protocol.v0_8.output.ProtocolOutputConverterRegistry;
-import org.apache.qpid.server.queue.QueueEntry;
 import org.apache.qpid.server.security.auth.AuthenticatedPrincipal;
 import org.apache.qpid.server.protocol.v0_8.state.AMQState;
 import org.apache.qpid.server.protocol.v0_8.state.AMQStateManager;
@@ -348,7 +349,7 @@ public class AMQProtocolEngine implement
      * Process the data block.
      * If the message is for a channel it is added to {@link #_channelsForCurrentMessage}.
      *
-     * @throws an AMQConnectionException if unable to process the data block. In this case,
+     * @throws AMQConnectionException if unable to process the data block. In this case,
      * the connection is already closed by the time the exception is thrown. If any other
      * type of exception is thrown, the connection is not already closed.
      */
@@ -376,7 +377,7 @@ public class AMQProtocolEngine implement
      * Handle the supplied frame.
      * Adds this frame's channel to {@link #_channelsForCurrentMessage}.
      *
-     * @throws an AMQConnectionException if unable to process the data block. In this case,
+     * @throws AMQConnectionException if unable to process the data block. In this case,
      * the connection is already closed by the time the exception is thrown. If any other
      * type of exception is thrown, the connection is not already closed.
      */
@@ -386,7 +387,7 @@ public class AMQProtocolEngine implement
         AMQChannel amqChannel = _channelMap.get(channelId);
         if(amqChannel != null)
         {
-            // The _receivedLock is already aquired in the caller
+            // The _receivedLock is already acquired in the caller
             // It is safe to add channel
             _channelsForCurrentMessage.add(amqChannel);
         }
@@ -476,7 +477,7 @@ public class AMQProtocolEngine implement
         (_codecFactory.getDecoder()).setExpectProtocolInitiation(false);
         try
         {
-            // Log incomming protocol negotiation request
+            // Log incoming protocol negotiation request
             _actor.message(ConnectionMessages.OPEN(null, pi.getProtocolMajor() + "-" + pi.getProtocolMinor(), null, null, false, true, false, false));
 
             ProtocolVersion pv = pi.checkVersion(); // Fails if not correct
@@ -607,7 +608,7 @@ public class AMQProtocolEngine implement
                 {
                     if (_logger.isDebugEnabled())
                     {
-                        _logger.debug("ChannelException occured on non-existent channel:" + e.getMessage());
+                        _logger.debug("ChannelException occurred on non-existent channel:" + e.getMessage());
                     }
 
                     if (_logger.isInfoEnabled())
@@ -850,14 +851,14 @@ public class AMQProtocolEngine implement
 
     public void closeChannelOk(int channelId)
     {
-        // todo QPID-847 - This is called from two lcoations ChannelCloseHandler and ChannelCloseOkHandler.
-        // When it is the CC_OK_Handler then it makes sence to remove the channel else we will leak memory.
+        // todo QPID-847 - This is called from two locations ChannelCloseHandler and ChannelCloseOkHandler.
+        // When it is the CC_OK_Handler then it makes sense to remove the channel else we will leak memory.
         // We do it from the Close Handler as we are sending the OK back to the client.
         // While this is AMQP spec compliant. The Java client in the event of an IllegalArgumentException
         // will send a close-ok.. Where we should call removeChannel.
         // However, due to the poor exception handling on the client. The client-user will be notified of the
         // InvalidArgument and if they then decide to close the session/connection then the there will be time
-        // for that to occur i.e. a new close method be sent before the exeption handling can mark the session closed.
+        // for that to occur i.e. a new close method be sent before the exception handling can mark the session closed.
 
         _closingChannelsList.remove(channelId);
     }
@@ -1667,12 +1668,17 @@ public class AMQProtocolEngine implement
             _channelId = channelId;
         }
 
-        public void deliverToClient(final Subscription sub, final QueueEntry entry, final long deliveryTag)
+        @Override
+        public void deliverToClient(final Subscription sub, final ServerMessage message,
+                                    final InstanceProperties props, final long deliveryTag)
                 throws AMQException
         {
-            registerMessageDelivered(entry.getMessage().getSize());
-            _protocolOutputConverter.writeDeliver(entry, _channelId, deliveryTag, ((SubscriptionImpl)sub).getConsumerTag());
-            entry.incrementDeliveryCount();
+            registerMessageDelivered(message.getSize());
+            _protocolOutputConverter.writeDeliver(message,
+                                                  props,
+                                                  _channelId,
+                                                  deliveryTag,
+                                                  ((SubscriptionImpl)sub).getConsumerTag());
         }
 
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java Wed Jan 29 14:48:50 2014
@@ -123,7 +123,7 @@ public interface AMQProtocolSession exte
     void closeChannel(int channelId, AMQConstant cause, String message) throws AMQException;
 
     /**
-     * Markes the specific channel as closed. This will release the lock for that channel id so a new channel can be
+     * Marks the specific channel as closed. This will release the lock for that channel id so a new channel can be
      * created on that id.
      *
      * @param channelId id of the channel to close

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java Wed Jan 29 14:48:50 2014
@@ -37,20 +37,20 @@ public class ExtractResendAndRequeue imp
 
     private final Map<Long, QueueEntry> _msgToRequeue;
     private final Map<Long, QueueEntry> _msgToResend;
-    private final boolean _requeueIfUnabletoResend;
+    private final boolean _requeueIfUnableToResend;
     private final UnacknowledgedMessageMap _unacknowledgedMessageMap;
     private final MessageStore _transactionLog;
 
     public ExtractResendAndRequeue(UnacknowledgedMessageMap unacknowledgedMessageMap,
                                    Map<Long, QueueEntry> msgToRequeue,
                                    Map<Long, QueueEntry> msgToResend,
-                                   boolean requeueIfUnabletoResend,
+                                   boolean requeueIfUnableToResend,
                                    MessageStore txnLog)
     {
         _unacknowledgedMessageMap = unacknowledgedMessageMap;
         _msgToRequeue = msgToRequeue;
         _msgToResend = msgToResend;
-        _requeueIfUnabletoResend = requeueIfUnabletoResend;
+        _requeueIfUnableToResend = requeueIfUnableToResend;
         _transactionLog = txnLog;
     }
 
@@ -78,7 +78,7 @@ public class ExtractResendAndRequeue imp
             // cannot resend, so re-queue.
             if (!message.isQueueDeleted())
             {
-                if (_requeueIfUnabletoResend)
+                if (_requeueIfUnableToResend)
                 {
                     _msgToRequeue.put(deliveryTag, message);
                 }
@@ -115,7 +115,7 @@ public class ExtractResendAndRequeue imp
 
                         public void postCommit()
                         {
-                            node.discard();
+                            node.delete();
                         }
 
                         public void onRollback()

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java Wed Jan 29 14:48:50 2014
@@ -28,7 +28,6 @@ import org.apache.qpid.framing.AMQShortS
 import org.apache.qpid.framing.FieldTable;
 import org.apache.qpid.server.filter.FilterManager;
 import org.apache.qpid.server.filter.FilterManagerFactory;
-import org.apache.qpid.server.filter.Filterable;
 import org.apache.qpid.server.flow.FlowCreditManager;
 import org.apache.qpid.server.logging.LogActor;
 import org.apache.qpid.server.logging.LogSubject;
@@ -36,6 +35,9 @@ import org.apache.qpid.server.logging.ac
 import org.apache.qpid.server.logging.actors.SubscriptionActor;
 import org.apache.qpid.server.logging.messages.SubscriptionMessages;
 import org.apache.qpid.server.logging.subjects.SubscriptionLogSubject;
+import org.apache.qpid.server.message.InstanceProperties;
+import org.apache.qpid.server.message.MessageReference;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.protocol.MessageConverterRegistry;
 import org.apache.qpid.server.protocol.v0_8.output.ProtocolOutputConverter;
 import org.apache.qpid.server.protocol.AMQSessionModel;
@@ -56,7 +58,7 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
 /**
- * Encapsulation of a supscription to a queue. <p/> Ties together the protocol session of a subscriber, the consumer tag
+ * Encapsulation of a subscription to a queue. <p/> Ties together the protocol session of a subscriber, the consumer tag
  * that was given out by the broker and the channel id. <p/>
  */
 public abstract class SubscriptionImpl implements Subscription, FlowCreditManager.FlowCreditManagerListener
@@ -132,7 +134,7 @@ public abstract class SubscriptionImpl i
             synchronized (getChannel())
             {
                 long deliveryTag = getChannel().getNextDeliveryTag();
-                sendToClient(entry, deliveryTag);
+                sendToClient(entry.getMessage(), entry.getInstanceProperties(), deliveryTag);
             }
 
         }
@@ -147,7 +149,7 @@ public abstract class SubscriptionImpl i
 
     public static class NoAckSubscription extends SubscriptionImpl
     {
-        private volatile AutoCommitTransaction _txn;
+        private final AutoCommitTransaction _txn;
 
         public NoAckSubscription(AMQChannel channel, AMQProtocolSession protocolSession,
                                  AMQShortString consumerTag, FieldTable filters,
@@ -157,6 +159,7 @@ public abstract class SubscriptionImpl i
             throws AMQException
         {
             super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod);
+            _txn = new AutoCommitTransaction(protocolSession.getVirtualHost().getMessageStore());
         }
 
 
@@ -192,23 +195,22 @@ public abstract class SubscriptionImpl i
 
             // The send may of course still fail, in which case, as
             // the message is unacked, it will be lost.
-            if(_txn == null)
-            {
-                _txn = new AutoCommitTransaction(getQueue().getVirtualHost().getMessageStore());
-            }
             _txn.dequeue(getQueue(), entry.getMessage(), NOOP);
 
-            entry.dequeue();
+            ServerMessage message = entry.getMessage();
+            MessageReference ref = message.newReference();
+            InstanceProperties props = entry.getInstanceProperties();
+            entry.delete();
 
             synchronized (getChannel())
             {
                 getChannel().getProtocolSession().setDeferFlush(batch);
                 long deliveryTag = getChannel().getNextDeliveryTag();
 
-                sendToClient(entry, deliveryTag);
+                sendToClient(message, props, deliveryTag);
 
             }
-            entry.dispose();
+            ref.release();
 
 
         }
@@ -301,8 +303,8 @@ public abstract class SubscriptionImpl i
 
                 addUnacknowledgedMessage(entry);
                 recordMessageDelivery(entry, deliveryTag);
-                sendToClient(entry, deliveryTag);
-
+                sendToClient(entry.getMessage(), entry.getInstanceProperties(), deliveryTag);
+                entry.incrementDeliveryCount();
 
             }
         }
@@ -688,12 +690,12 @@ public abstract class SubscriptionImpl i
     }
 
 
-    protected void sendToClient(final QueueEntry entry, final long deliveryTag)
+    protected void sendToClient(final ServerMessage message, final InstanceProperties props, final long deliveryTag)
             throws AMQException
     {
-        _deliveryMethod.deliverToClient(this,entry,deliveryTag);
+        _deliveryMethod.deliverToClient(this, message, props, deliveryTag);
         _deliveredCount.incrementAndGet();
-        _deliveredBytes.addAndGet(entry.getSize());
+        _deliveredBytes.addAndGet(message.getSize());
     }
 
 

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicGetMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicGetMethodHandler.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicGetMethodHandler.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicGetMethodHandler.java Wed Jan 29 14:48:50 2014
@@ -28,10 +28,11 @@ import org.apache.qpid.framing.BasicGetB
 import org.apache.qpid.framing.BasicGetEmptyBody;
 import org.apache.qpid.framing.MethodRegistry;
 import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.server.message.InstanceProperties;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.protocol.v0_8.AMQChannel;
 import org.apache.qpid.server.flow.FlowCreditManager;
 import org.apache.qpid.server.flow.MessageOnlyCreditManager;
-import org.apache.qpid.server.protocol.v0_8.AMQMessage;
 import org.apache.qpid.server.protocol.v0_8.AMQProtocolSession;
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.queue.AMQQueue;
@@ -126,21 +127,18 @@ public class BasicGetMethodHandler imple
         final ClientDeliveryMethod getDeliveryMethod = new ClientDeliveryMethod()
         {
 
-            public void deliverToClient(final Subscription sub, final QueueEntry entry, final long deliveryTag)
+            @Override
+            public void deliverToClient(final Subscription sub, final ServerMessage message, final
+                                        InstanceProperties props, final long deliveryTag)
             throws AMQException
             {
-                singleMessageCredit.useCreditForMessage(entry.getMessage().getSize());
-                if(entry.getMessage() instanceof AMQMessage)
-                {
-                    session.getProtocolOutputConverter().writeGetOk(entry, channel.getChannelId(),
-                                                                            deliveryTag, queue.getMessageCount());
-                    entry.incrementDeliveryCount();
-                }
-                else
-                {
-                    //TODO Convert AMQP 0-10 message
-                    throw new AMQException(AMQConstant.NOT_IMPLEMENTED, "Not implemented conversion of 0-10 message", null);
-                }
+                singleMessageCredit.useCreditForMessage(message.getSize());
+                session.getProtocolOutputConverter().writeGetOk(message,
+                                                                props,
+                                                                channel.getChannelId(),
+                                                                deliveryTag,
+                                                                queue.getMessageCount());
+
 
             }
         };

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicRejectMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicRejectMethodHandler.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicRejectMethodHandler.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicRejectMethodHandler.java Wed Jan 29 14:48:50 2014
@@ -79,7 +79,7 @@ public class BasicRejectMethodHandler im
                 message = channel.getUnacknowledgedMessageMap().remove(deliveryTag);
                 if(message != null)
                 {
-                    message.discard();
+                    message.delete();
                 }
                 return;
             }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java Wed Jan 29 14:48:50 2014
@@ -31,6 +31,6 @@ public class UnexpectedMethodException e
 
     public UnexpectedMethodException(AMQMethodBody body)
     {
-        super("Unexpected method recevied: " + body.getClass().getName());
+        super("Unexpected method received: " + body.getClass().getName());
     }
 }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverter.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverter.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverter.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverter.java Wed Jan 29 14:48:50 2014
@@ -1,60 +1,69 @@
-/*
- *
- * 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.
- *
- */
-
-/*
- * This file is auto-generated by Qpid Gentools v.0.1 - do not modify.
- * Supported AMQP versions:
- *   8-0
- */
-package org.apache.qpid.server.protocol.v0_8.output;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQDataBlock;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.ContentHeaderBody;
-import org.apache.qpid.framing.abstraction.MessagePublishInfo;
-import org.apache.qpid.server.message.MessageContentSource;
-import org.apache.qpid.server.protocol.v0_8.AMQProtocolSession;
-import org.apache.qpid.server.queue.QueueEntry;
-
-public interface ProtocolOutputConverter
-{
-    void confirmConsumerAutoClose(int channelId, AMQShortString consumerTag);
-
-    interface Factory
-    {
-        ProtocolOutputConverter newInstance(AMQProtocolSession session);
-    }
-
-    void writeDeliver(QueueEntry entry, int channelId, long deliveryTag, AMQShortString consumerTag)
-            throws AMQException;
-
-    void writeGetOk(QueueEntry message, int channelId, long deliveryTag, int queueSize) throws AMQException;
-
-    byte getProtocolMinorVersion();
-
-    byte getProtocolMajorVersion();
-
-    void writeReturn(MessagePublishInfo messagePublishInfo, ContentHeaderBody header, MessageContentSource msgContent,  int channelId, int replyCode, AMQShortString replyText)
-                    throws AMQException;
-
-    void writeFrame(AMQDataBlock block);
-}
+/*
+ *
+ * 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.
+ *
+ */
+
+/*
+ * This file is auto-generated by Qpid Gentools v.0.1 - do not modify.
+ * Supported AMQP versions:
+ *   8-0
+ */
+package org.apache.qpid.server.protocol.v0_8.output;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.AMQDataBlock;
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.framing.ContentHeaderBody;
+import org.apache.qpid.framing.abstraction.MessagePublishInfo;
+import org.apache.qpid.server.message.InstanceProperties;
+import org.apache.qpid.server.message.MessageContentSource;
+import org.apache.qpid.server.message.ServerMessage;
+import org.apache.qpid.server.protocol.v0_8.AMQProtocolSession;
+import org.apache.qpid.server.queue.QueueEntry;
+
+public interface ProtocolOutputConverter
+{
+    void confirmConsumerAutoClose(int channelId, AMQShortString consumerTag);
+
+    interface Factory
+    {
+        ProtocolOutputConverter newInstance(AMQProtocolSession session);
+    }
+
+    void writeDeliver(final ServerMessage msg,
+                      final InstanceProperties props, int channelId,
+                      long deliveryTag,
+                      AMQShortString consumerTag)
+            throws AMQException;
+
+    void writeGetOk(final ServerMessage msg,
+                    final InstanceProperties props,
+                    int channelId,
+                    long deliveryTag,
+                    int queueSize) throws AMQException;
+
+    byte getProtocolMinorVersion();
+
+    byte getProtocolMajorVersion();
+
+    void writeReturn(MessagePublishInfo messagePublishInfo, ContentHeaderBody header, MessageContentSource msgContent,  int channelId, int replyCode, AMQShortString replyText)
+                    throws AMQException;
+
+    void writeFrame(AMQDataBlock block);
+}

Propchange: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverterImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverterImpl.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverterImpl.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverterImpl.java Wed Jan 29 14:48:50 2014
@@ -33,13 +33,13 @@ import org.apache.qpid.framing.ContentHe
 import org.apache.qpid.framing.MethodRegistry;
 import org.apache.qpid.framing.abstraction.MessagePublishInfo;
 import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
+import org.apache.qpid.server.message.InstanceProperties;
 import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.plugin.MessageConverter;
 import org.apache.qpid.server.protocol.MessageConverterRegistry;
 import org.apache.qpid.server.protocol.v0_8.AMQMessage;
 import org.apache.qpid.server.message.MessageContentSource;
 import org.apache.qpid.server.protocol.v0_8.AMQProtocolSession;
-import org.apache.qpid.server.queue.QueueEntry;
 
 import java.io.DataOutput;
 import java.io.IOException;
@@ -64,24 +64,27 @@ class ProtocolOutputConverterImpl implem
         return _protocolSession;
     }
 
-    public void writeDeliver(QueueEntry entry, int channelId, long deliveryTag, AMQShortString consumerTag)
+    public void writeDeliver(final ServerMessage m,
+                             final InstanceProperties props, int channelId,
+                             long deliveryTag,
+                             AMQShortString consumerTag)
             throws AMQException
     {
-        AMQMessage msg = convertToAMQMessage(entry);
-        AMQBody deliverBody = createEncodedDeliverBody(msg, entry.isRedelivered(), deliveryTag, consumerTag);
+        final AMQMessage msg = convertToAMQMessage(m);
+        final boolean isRedelivered = Boolean.TRUE.equals(props.getProperty(InstanceProperties.Property.REDELIVERED));
+        AMQBody deliverBody = createEncodedDeliverBody(msg, isRedelivered, deliveryTag, consumerTag);
         writeMessageDelivery(msg, channelId, deliverBody);
     }
 
-    private AMQMessage convertToAMQMessage(QueueEntry entry)
+    private AMQMessage convertToAMQMessage(ServerMessage serverMessage)
     {
-        ServerMessage serverMessage = entry.getMessage();
         if(serverMessage instanceof AMQMessage)
         {
             return (AMQMessage) serverMessage;
         }
         else
         {
-            return getMessageConverter(serverMessage).convert(serverMessage, entry.getQueue().getVirtualHost());
+            return getMessageConverter(serverMessage).convert(serverMessage, _protocolSession.getVirtualHost());
         }
     }
 
@@ -186,10 +189,14 @@ class ProtocolOutputConverterImpl implem
         }
     }
 
-    public void writeGetOk(QueueEntry entry, int channelId, long deliveryTag, int queueSize) throws AMQException
+    public void writeGetOk(final ServerMessage msg,
+                           final InstanceProperties props,
+                           int channelId,
+                           long deliveryTag,
+                           int queueSize) throws AMQException
     {
-        AMQBody deliver = createEncodedGetOkBody(entry, deliveryTag, queueSize);
-        writeMessageDelivery(convertToAMQMessage(entry), channelId, deliver);
+        AMQBody deliver = createEncodedGetOkBody(msg, props, deliveryTag, queueSize);
+        writeMessageDelivery(convertToAMQMessage(msg), channelId, deliver);
     }
 
 
@@ -274,18 +281,18 @@ class ProtocolOutputConverterImpl implem
         }
     }
 
-    private AMQBody createEncodedGetOkBody(QueueEntry entry, long deliveryTag, int queueSize)
+    private AMQBody createEncodedGetOkBody(ServerMessage msg, InstanceProperties props, long deliveryTag, int queueSize)
             throws AMQException
     {
         final AMQShortString exchangeName;
         final AMQShortString routingKey;
 
-        final AMQMessage message = convertToAMQMessage(entry);
+        final AMQMessage message = convertToAMQMessage(msg);
         final MessagePublishInfo pb = message.getMessagePublishInfo();
         exchangeName = pb.getExchange();
         routingKey = pb.getRoutingKey();
 
-        final boolean isRedelivered = entry.isRedelivered();
+        final boolean isRedelivered = Boolean.TRUE.equals(props.getProperty(InstanceProperties.Property.REDELIVERED));
 
         BasicGetOkBody getOkBody =
                 _methodRegistry.createBasicGetOkBody(deliveryTag,

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java Wed Jan 29 14:48:50 2014
@@ -182,7 +182,7 @@ public class AckTest extends QpidTestCas
         final int msgCount = 10;
         publishMessages(msgCount, true);
         UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
-        assertEquals("Unextpected size for unacknowledge message map",msgCount,map.size());
+        assertEquals("Unexpected size for unacknowledged message map",msgCount,map.size());
 
         Set<Long> deliveryTagSet = map.getDeliveryTags();
         int i = 1;
@@ -333,93 +333,6 @@ public class AckTest extends QpidTestCas
 
     }
 
-
-/*
-    public void testPrefetchHighLow() throws AMQException
-    {
-        int lowMark = 5;
-        int highMark = 10;
-
-        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager());
-        _channel.setPrefetchLowMarkCount(lowMark);
-        _channel.setPrefetchHighMarkCount(highMark);
-
-        assertTrue(_channel.getPrefetchLowMarkCount() == lowMark);
-        assertTrue(_channel.getPrefetchHighMarkCount() == highMark);
-
-        publishMessages(highMark);
-
-        // at this point we should have sent out only highMark messages
-        // which have not bee received so will be queued up in the channel
-        // which should be suspended
-        assertTrue(_subscription.isSuspended());
-        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
-        assertTrue(map.size() == highMark);
-
-        //acknowledge messages so we are just above lowMark
-        _channel.acknowledgeMessage(lowMark - 1, true);
-
-        //we should still be suspended
-        assertTrue(_subscription.isSuspended());
-        assertTrue(map.size() == lowMark + 1);
-
-        //acknowledge one more message
-        _channel.acknowledgeMessage(lowMark, true);
-
-        //and suspension should be lifted
-        assertTrue(!_subscription.isSuspended());
-
-        //pubilsh more msgs so we are just below the limit
-        publishMessages(lowMark - 1);
-
-        //we should not be suspended
-        assertTrue(!_subscription.isSuspended());
-
-        //acknowledge all messages
-        _channel.acknowledgeMessage(0, true);
-        try
-        {
-            Thread.sleep(3000);
-        }
-        catch (InterruptedException e)
-        {
-            _log.error("Error: " + e, e);
-        }
-        //map will be empty
-        assertTrue(map.size() == 0);
-    }
-
-*/
-/*
-    public void testPrefetch() throws AMQException
-    {
-        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager());
-        _channel.setMessageCredit(5);
-
-        assertTrue(_channel.getPrefetchCount() == 5);
-
-        final int msgCount = 5;
-        publishMessages(msgCount);
-
-        // at this point we should have sent out only 5 messages with a further 5 queued
-        // up in the channel which should now be suspended
-        assertTrue(_subscription.isSuspended());
-        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
-        assertTrue(map.size() == 5);
-        _channel.acknowledgeMessage(5, true);
-        assertTrue(!_subscription.isSuspended());
-        try
-        {
-            Thread.sleep(3000);
-        }
-        catch (InterruptedException e)
-        {
-            _log.error("Error: " + e, e);
-        }
-        assertTrue(map.size() == 0);
-    }
-
-*/
     public static junit.framework.Test suite()
     {
         return new junit.framework.TestSuite(AckTest.class);

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java Wed Jan 29 14:48:50 2014
@@ -117,12 +117,12 @@ public class AcknowledgeTest extends Qpi
         runMessageAck(10, 1, 0, true, 0);
     }
 
-    protected void runMessageAck(int sendMessageCount, long firstDeliveryTag, long acknowledgeDeliveryTag, boolean acknowldegeMultiple, int remainingUnackedMessages) throws AMQException
+    protected void runMessageAck(int sendMessageCount, long firstDeliveryTag, long acknowledgeDeliveryTag, boolean acknowledgeMultiple, int remainingUnackedMessages) throws AMQException
     {
         //Check store is empty
         checkStoreContents(0);
 
-        //Send required messsages to the queue
+        //Send required messages to the queue
         BrokerTestHelper_0_8.publishMessages(getChannel(),
                 sendMessageCount,
                 _queueName,
@@ -147,7 +147,7 @@ public class AcknowledgeTest extends Qpi
         //Wait for the messages to be delivered
         getSession().awaitDelivery(sendMessageCount);
 
-        //Check that they are all waiting to be acknoledged
+        //Check that they are all waiting to be acknowledged
         assertEquals("Channel should have unacked msgs", sendMessageCount, getChannel().getUnacknowledgedMessageMap().size());
 
         List<InternalTestProtocolSession.DeliveryPair> messages = getSession().getDelivers(getChannel().getChannelId(), subscriber, sendMessageCount);
@@ -159,7 +159,7 @@ public class AcknowledgeTest extends Qpi
         assertEquals("First message does not have expected deliveryTag", firstDeliveryTag, messages.get(0).getDeliveryTag());
 
         //Send required Acknowledgement
-        getChannel().acknowledgeMessage(acknowledgeDeliveryTag, acknowldegeMultiple);
+        getChannel().acknowledgeMessage(acknowledgeDeliveryTag, acknowledgeMultiple);
 
         if (getChannel().isTransactional())
         {

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java Wed Jan 29 14:48:50 2014
@@ -66,11 +66,11 @@ public class BrokerTestHelper_0_8 extend
 
     public static void publishMessages(AMQChannel channel, int numberOfMessages, String queueName, String exchangeName) throws AMQException
     {
-        AMQShortString rouningKey = new AMQShortString(queueName);
+        AMQShortString routingKey = new AMQShortString(queueName);
         AMQShortString exchangeNameAsShortString = new AMQShortString(exchangeName);
         MessagePublishInfo info = mock(MessagePublishInfo.class);
         when(info.getExchange()).thenReturn(exchangeNameAsShortString);
-        when(info.getRoutingKey()).thenReturn(rouningKey);
+        when(info.getRoutingKey()).thenReturn(routingKey);
 
         Exchange exchange = channel.getVirtualHost().getExchange(exchangeName);
         for (int count = 0; count < numberOfMessages; count++)

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java Wed Jan 29 14:48:50 2014
@@ -45,12 +45,12 @@ import java.util.Map;
  *
  * This clearing/prep for resend was done as a result of the rollback call. HOWEVER, the delivery thread was still
  * in the process of sending messages to the client. It is therefore possible that a message could block on the
- * _unackedMap lock waiting for the visit to compelete so that it can add the new message to the unackedMap....
+ * _unackedMap lock waiting for the visit to complete so that it can add the new message to the unackedMap....
  * which is then cleared by the resend/rollback thread.
  *
  * This problem was encountered by the testSend2ThenRollback test.
  *
- * To try and increase the chance of the race condition occuring this test will send multiple messages so that the
+ * To try and increase the chance of the race condition occurring this test will send multiple messages so that the
  * delivery thread will be in progress while the rollback method is called. Hopefully this will cause the
  * deliveryTag to be lost
  */
@@ -82,7 +82,7 @@ public class ExtractResendAndRequeueTest
             id++;
         }
 
-        // Iterate through the QueueEntryList and add entries to unacknowledgeMessageMap and referecenList
+        // Iterate through the QueueEntryList and add entries to unacknowledgedMessageMap and referenceList
         QueueEntryIterator queueEntries = list.iterator();
         while(queueEntries.advance())
         {
@@ -97,13 +97,13 @@ public class ExtractResendAndRequeueTest
     }
 
     /**
-     * Helper method to create a new subscription and aquire the given messages.
+     * Helper method to create a new subscription and acquire the given messages.
      *
-     * @param messageList The messages to aquire
+     * @param messageList The messages to acquire
      *
-     * @return Subscription that performed the aquire
+     * @return Subscription that performed the acquire
      */
-    private Subscription createSubscriptionAndAquireMessages(LinkedList<QueueEntry> messageList)
+    private Subscription createSubscriptionAndAcquireMessages(LinkedList<QueueEntry> messageList)
     {
         Subscription subscription = new MockSubscription();
 
@@ -119,7 +119,7 @@ public class ExtractResendAndRequeueTest
     /**
      * This is the normal consumer rollback method.
      *
-     * An active consumer that has aquired messages expects those messasges to be reset when rollback is requested.
+     * An active consumer that has acquired messages expects those messages to be reset when rollback is requested.
      *
      * This test validates that the msgToResend map includes all the messages and none are left behind.
      *
@@ -128,12 +128,12 @@ public class ExtractResendAndRequeueTest
     public void testResend() throws AMQException
     {
         //We don't need the subscription object here.
-        createSubscriptionAndAquireMessages(_referenceList);
+        createSubscriptionAndAcquireMessages(_referenceList);
 
         final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>();
         final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>();
 
-        // requeueIfUnabletoResend doesn't matter here.
+        // requeueIfUnableToResend doesn't matter here.
         _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue,
                                                                     msgToResend, true, _messageStore));
 
@@ -145,8 +145,8 @@ public class ExtractResendAndRequeueTest
     /**
      * This is the normal consumer close method.
      *
-     * When a consumer that has aquired messages expects closes the messages that it has aquired should be removed from
-     * the unacknowledgeMap and placed in msgToRequeue
+     * When a consumer that has acquired messages expects closes the messages that it has acquired should be removed from
+     * the unacknowledgedMap and placed in msgToRequeue
      *
      * This test validates that the msgToRequeue map includes all the messages and none are left behind.
      *
@@ -154,7 +154,7 @@ public class ExtractResendAndRequeueTest
      */
     public void testRequeueDueToSubscriptionClosure() throws AMQException
     {
-        Subscription subscription = createSubscriptionAndAquireMessages(_referenceList);
+        Subscription subscription = createSubscriptionAndAcquireMessages(_referenceList);
 
         // Close subscription
         subscription.close();
@@ -162,7 +162,7 @@ public class ExtractResendAndRequeueTest
         final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>();
         final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>();
 
-        // requeueIfUnabletoResend doesn't matter here.
+        // requeueIfUnableToResend doesn't matter here.
         _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue,
                                                                     msgToResend, true, _messageStore));
 
@@ -173,7 +173,7 @@ public class ExtractResendAndRequeueTest
 
     /**
      * If the subscription is null, due to message being retrieved via a GET, And we request that messages are requeued
-     * requeueIfUnabletoResend(set to true) then all messages should be sent to the msgToRequeue map.
+     * requeueIfUnableToResend(set to true) then all messages should be sent to the msgToRequeue map.
      *
      * @throws AMQException the visit interface throws this
      */
@@ -183,7 +183,7 @@ public class ExtractResendAndRequeueTest
         final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>();
         final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>();
 
-        // requeueIfUnabletoResend = true so all messages should go to msgToRequeue
+        // requeueIfUnableToResend = true so all messages should go to msgToRequeue
         _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue,
                                                                     msgToResend, true, _messageStore));
 
@@ -194,7 +194,7 @@ public class ExtractResendAndRequeueTest
 
     /**
      * If the subscription is null, due to message being retrieved via a GET, And we request that we don't
-     * requeueIfUnabletoResend(set to false) then all messages should be dropped as we do not have a dead letter queue.
+     * requeueIfUnableToResend(set to false) then all messages should be dropped as we do not have a dead letter queue.
      *
      * @throws AMQException the visit interface throws this
      */
@@ -204,7 +204,7 @@ public class ExtractResendAndRequeueTest
         final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>();
         final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>();
 
-        // requeueIfUnabletoResend = false so all messages should be dropped all maps should be empty
+        // requeueIfUnableToResend = false so all messages should be dropped all maps should be empty
         _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue,
                                                                     msgToResend, false, _messageStore));
 
@@ -222,7 +222,7 @@ public class ExtractResendAndRequeueTest
 
     /**
      * If the subscription is null, due to message being retrieved via a GET, AND the queue upon which the message was
-     * delivered has been deleted then it is not possible to requeue. Currently we simply discar the message but in the
+     * delivered has been deleted then it is not possible to requeue. Currently we simply discard the message but in the
      * future we may wish to dead letter the message.
      *
      * Validate that at the end of the visit all Maps are empty and all messages are marked as deleted
@@ -236,7 +236,7 @@ public class ExtractResendAndRequeueTest
 
         _queue.delete();
 
-        // requeueIfUnabletoResend : value doesn't matter here as queue has been deleted
+        // requeueIfUnableToResend : value doesn't matter here as queue has been deleted
         _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue,
                                                                     msgToResend, false, _messageStore));
 

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java Wed Jan 29 14:48:50 2014
@@ -41,7 +41,9 @@ import org.apache.qpid.framing.AMQShortS
 import org.apache.qpid.framing.ContentHeaderBody;
 import org.apache.qpid.framing.abstraction.MessagePublishInfo;
 import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.server.message.InstanceProperties;
 import org.apache.qpid.server.message.MessageContentSource;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.protocol.v0_8.output.ProtocolOutputConverter;
@@ -133,11 +135,6 @@ public class InternalTestProtocolSession
         }
     }
 
-    // *** ProtocolOutputConverter Implementation
-    public void writeReturn(AMQMessage message, int channelId, int replyCode, AMQShortString replyText) throws AMQException
-    {
-    }
-
     public ClientDeliveryMethod createDeliveryMethod(int channelId)
     {
         return new InternalWriteDeliverMethod(channelId);
@@ -147,7 +144,10 @@ public class InternalTestProtocolSession
     {
     }
 
-    public void writeDeliver(QueueEntry entry, int channelId, long deliveryTag, AMQShortString consumerTag) throws AMQException
+    public void writeDeliver(final ServerMessage msg,
+                             final InstanceProperties props, int channelId,
+                             long deliveryTag,
+                             AMQShortString consumerTag) throws AMQException
     {
         _deliveryCount.incrementAndGet();
 
@@ -169,11 +169,15 @@ public class InternalTestProtocolSession
                 consumers.put(consumerTag, consumerDelivers);
             }
 
-            consumerDelivers.add(new DeliveryPair(deliveryTag, (AMQMessage)entry.getMessage()));
+            consumerDelivers.add(new DeliveryPair(deliveryTag, (AMQMessage)msg));
         }
     }
 
-    public void writeGetOk(QueueEntry message, int channelId, long deliveryTag, int queueSize) throws AMQException
+    public void writeGetOk(final ServerMessage msg,
+                           final InstanceProperties props,
+                           int channelId,
+                           long deliveryTag,
+                           int queueSize) throws AMQException
     {
     }
 
@@ -187,7 +191,7 @@ public class InternalTestProtocolSession
             }
             catch (InterruptedException e)
             {
-                _logger.error("Thread interupted", e);
+                _logger.error("Thread interrupted", e);
             }
         }
     }
@@ -195,15 +199,15 @@ public class InternalTestProtocolSession
     public class DeliveryPair
     {
         private long _deliveryTag;
-        private AMQMessage _message;
+        private ServerMessage _message;
 
-        public DeliveryPair(long deliveryTag, AMQMessage message)
+        public DeliveryPair(long deliveryTag, ServerMessage message)
         {
             _deliveryTag = deliveryTag;
             _message = message;
         }
 
-        public AMQMessage getMessage()
+        public ServerMessage getMessage()
         {
             return _message;
         }
@@ -242,7 +246,9 @@ public class InternalTestProtocolSession
         }
 
 
-        public void deliverToClient(Subscription sub, QueueEntry entry, long deliveryTag) throws AMQException
+        @Override
+        public void deliverToClient(Subscription sub, ServerMessage message,
+                                    InstanceProperties props, long deliveryTag) throws AMQException
         {
             _deliveryCount.incrementAndGet();
 
@@ -264,7 +270,7 @@ public class InternalTestProtocolSession
                     consumers.put(((SubscriptionImpl)sub).getConsumerTag(), consumerDelivers);
                 }
 
-                consumerDelivers.add(new DeliveryPair(deliveryTag, (AMQMessage)entry.getMessage()));
+                consumerDelivers.add(new DeliveryPair(deliveryTag, message));
             }
         }
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java Wed Jan 29 14:48:50 2014
@@ -60,7 +60,7 @@ public class MaxChannelsTest extends Qpi
         }
         catch (AMQException e)
         {
-            assertEquals("Wrong exception recevied.", e.getErrorCode(), AMQConstant.NOT_ALLOWED);
+            assertEquals("Wrong exception received.", e.getErrorCode(), AMQConstant.NOT_ALLOWED);
         }
         assertEquals("Maximum number of channels not set.", new Long(maxChannels), new Long(_session.getChannels().size()));
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java Wed Jan 29 14:48:50 2014
@@ -95,7 +95,7 @@ public class QueueBrowserUsesNoAckTest e
         //Check store is empty
         checkStoreContents(0);
 
-        //Send required messsages to the queue
+        //Send required messages to the queue
         BrokerTestHelper_0_8.publishMessages(getChannel(),
                 sendMessageCount,
                 _queueName,
@@ -124,7 +124,7 @@ public class QueueBrowserUsesNoAckTest e
                 getSession().getDelivers(getChannel().getChannelId(), browser,
                                      prefetch);
 
-        //Ensure we recevied the prefetched messages
+        //Ensure we received the prefetched messages
         assertEquals(prefetch, messages.size());
 
         //Check the process didn't suspend the subscription as this would

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java Wed Jan 29 14:48:50 2014
@@ -81,9 +81,9 @@ public class SubscriptionFactoryImplTest
         //create a browser subscription
         FieldTable filters = new FieldTable();
         filters.put(AMQPFilterTypes.NO_CONSUME.getValue(), true);
-        Subscription browerSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), true, null, false, _channel.getCreditManager());
-        assertEquals("Unexpected Subscription ID allocated", previousId + 1, browerSub.getSubscriptionID());
-        previousId = browerSub.getSubscriptionID();
+        Subscription browserSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), true, null, false, _channel.getCreditManager());
+        assertEquals("Unexpected Subscription ID allocated", previousId + 1, browserSub.getSubscriptionID());
+        previousId = browserSub.getSubscriptionID();
 
         //create an BasicGet NoAck subscription
         Subscription getNoAckSub = SubscriptionFactoryImpl.INSTANCE.createBasicGetNoAckSubscription(_channel, _session, new AMQShortString("1"), null, false,

Propchange: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0:r1560620-1562452

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java Wed Jan 29 14:48:50 2014
@@ -88,9 +88,9 @@ public class MessageMetaData_1_0 impleme
         this(fragments, decoder, new ArrayList<ByteBuffer>(3));
     }
 
-    public MessageMetaData_1_0(ByteBuffer[] fragments, SectionDecoder decoder, List<ByteBuffer> immuatableSections)
+    public MessageMetaData_1_0(ByteBuffer[] fragments, SectionDecoder decoder, List<ByteBuffer> immutableSections)
     {
-        this(constructSections(fragments, decoder,immuatableSections), immuatableSections);
+        this(constructSections(fragments, decoder,immutableSections), immutableSections);
     }
 
     private MessageMetaData_1_0(List<Section> sections, List<ByteBuffer> encodedSections)

Propchange: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java:r1560620-1562452

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java Wed Jan 29 14:48:50 2014
@@ -631,7 +631,7 @@ public class SendingLink_1_0 implements 
                                 {
                                     public void postCommit()
                                     {
-                                        queueEntry.discard();
+                                        queueEntry.delete();
                                     }
 
                                     public void onRollback()

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Subscription_1_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Subscription_1_0.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Subscription_1_0.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Subscription_1_0.java Wed Jan 29 14:48:50 2014
@@ -148,14 +148,12 @@ class
 
     public boolean hasInterest(final QueueEntry entry)
     {
-        if(entry.getMessage() instanceof Message_1_0)
+        if(_noLocal && entry.getMessage().getConnectionReference() == getSession().getConnection().getReference())
         {
-            if(_noLocal && ((Message_1_0)entry.getMessage()).getConnectionReference() == getSession().getConnection().getReference())
-            {
-                return false;
-            }
+            return false;
         }
-        else if(MessageConverterRegistry.getConverter(entry.getMessage().getClass(), Message_1_0.class)==null)
+        else if(!(entry.getMessage() instanceof Message_1_0)
+                && MessageConverterRegistry.getConverter(entry.getMessage().getClass(), Message_1_0.class)==null)
         {
             return false;
         }
@@ -537,7 +535,7 @@ class
                             {
                                 if(_queueEntry.isAcquiredBy(Subscription_1_0.this))
                                 {
-                                    _queueEntry.discard();
+                                    _queueEntry.delete();
                                 }
                             }
 

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java Wed Jan 29 14:48:50 2014
@@ -104,7 +104,7 @@ public class TxnCoordinatorLink_1_0 impl
         }
 
 
-        // Only interested int he amqp-value section that holds the message to the co-ordinator
+        // Only interested int he amqp-value section that holds the message to the coordinator
         try
         {
             List<Section> sections = _sectionDecoder.parseAll(payload);
@@ -182,7 +182,7 @@ public class TxnCoordinatorLink_1_0 impl
         {
             error = new Error();
             error.setCondition(AmqpError.NOT_FOUND);
-            error.setDescription("Unkown transactionId" + transactionId);
+            error.setDescription("Unknown transactionId" + transactionId);
         }
         return error;
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java Wed Jan 29 14:48:50 2014
@@ -53,10 +53,10 @@ public class RedirectingAuthorisationFil
     @Override
     public void init(FilterConfig config) throws ServletException
     {
-        String loginlUrl = config.getInitParameter(INIT_PARAM_LOGIN_URL);
-        if (loginlUrl != null)
+        String loginUrl = config.getInitParameter(INIT_PARAM_LOGIN_URL);
+        if (loginUrl != null)
         {
-            _loginUrl = loginlUrl;
+            _loginUrl = loginUrl;
         }
         ServletContext servletContext = config.getServletContext();
         _broker = HttpManagementUtil.getBroker(servletContext);

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java Wed Jan 29 14:48:50 2014
@@ -202,12 +202,12 @@ public class LogFileHelper
             String name = file.getName();
             if (name.startsWith(baseFileName))
             {
-                String diplayPath = name;
+                String displayPath = name;
                 if (!relativePath.equals(""))
                 {
-                    diplayPath = relativePath + name;
+                    displayPath = relativePath + name;
                 }
-                files.add(new LogFileDetails(diplayPath, appenderName, includeLogFileLocation ? file : null, getMimeType(name), file.length(),
+                files.add(new LogFileDetails(displayPath, appenderName, includeLogFileLocation ? file : null, getMimeType(name), file.length(),
                         file.lastModified()));
             }
         }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java Wed Jan 29 14:48:50 2014
@@ -445,7 +445,7 @@ public class MessageServlet extends Abst
         }
         catch(RuntimeException e)
         {
-            LOGGER.error("Failure to perform message opertion", e);
+            LOGGER.error("Failure to perform message operation", e);
             response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
         }
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java Wed Jan 29 14:48:50 2014
@@ -104,8 +104,8 @@ public class RestServlet extends Abstrac
                 Class<? extends ConfiguredObject> clazz = (Class<? extends ConfiguredObject>)itemClass;
                 classes.add(clazz);
             }
-            Class<? extends ConfiguredObject>[] hierachyClasses = (Class<? extends ConfiguredObject>[])new Class[classes.size()];
-            _hierarchy = classes.toArray(hierachyClasses);
+            Class<? extends ConfiguredObject>[] hierarchyClasses = (Class<? extends ConfiguredObject>[])new Class[classes.size()];
+            _hierarchy = classes.toArray(hierarchyClasses);
         }
         else
         {

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java Wed Jan 29 14:48:50 2014
@@ -214,9 +214,9 @@ public class LogFileHelperTest extends Q
             {
                 assertEquals("Unexpected mime type", LogFileHelper.TEXT_MIME_TYPE, d.getMimeType());
             }
-            assertEquals("Unexpecte file location", files[j], d.getLocation());
-            assertEquals("Unexpecte file size", files[j].length(), d.getSize());
-            assertEquals("Unexpecte file last modified date", files[j].lastModified(), d.getLastModified());
+            assertEquals("Unexpected file location", files[j], d.getLocation());
+            assertEquals("Unexpected file size", files[j].length(), d.getSize());
+            assertEquals("Unexpected file last modified date", files[j].lastModified(), d.getLastModified());
         }
         assertTrue("Gzip log file is not found", gzipFileFound);
     }
@@ -235,13 +235,13 @@ public class LogFileHelperTest extends Q
         assertTrue("No details should be created for non-existing file", details.isEmpty());
     }
 
-    public void testFindLogFileDetailsForIncorectlySpecifiedLogFilePath()
+    public void testFindLogFileDetailsForIncorrectlySpecifiedLogFilePath()
     {
         String[] logFileDisplayedPaths = { "FileAppender\\" + _appendersFiles.get("FileAppender").get(0).getName() };
         try
         {
             _helper.findLogFileDetails(logFileDisplayedPaths);
-            fail("Exception is expected for incorectly set path to log file");
+            fail("Exception is expected for incorrectly set path to log file");
         }
         catch (IllegalArgumentException e)
         {

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java Wed Jan 29 14:48:50 2014
@@ -47,7 +47,7 @@ class MBeanIntrospector
 {
 
     private static final String _defaultAttributeDescription = "Management attribute";
-    private static final String _defaultOerationDescription = "Management operation";
+    private static final String _defaultOperationDescription = "Management operation";
     private static final String _defaultConstructorDescription = "MBean constructor";
     private static final String _defaultMbeanDescription = "Management interface of the MBean";
 
@@ -221,7 +221,7 @@ class MBeanIntrospector
      * Helper method to retrieve the attribute index from the list of attributes.
      * @param attribute
      * @param list
-     * @return attribute index no. -1 if attribtue doesn't exist
+     * @return attribute index no. -1 if attribute doesn't exist
      * @throws javax.management.NotCompliantMBeanException
      */
     private static int getIndexIfAlreadyExists(MBeanAttributeInfo attribute,
@@ -281,7 +281,7 @@ class MBeanIntrospector
         MBeanParameterInfo[] paramsInfo = getParametersInfo(operation.getParameterAnnotations(),
                                                             operation.getParameterTypes());
 
-        String operationDesc = _defaultOerationDescription;
+        String operationDesc = _defaultOperationDescription;
         int impact = MBeanOperationInfo.UNKNOWN;
 
         if (operation.getAnnotation(MBeanOperation.class) != null)

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java Wed Jan 29 14:48:50 2014
@@ -198,7 +198,7 @@ public class MBeanInvocationHandlerImpl 
         }
         else
         {
-            _logger.error("Unexpected error occured on invoking of " + method + " with arguments " + Arrays.toString(args), targetException);
+            _logger.error("Unexpected error occurred on invoking of " + method + " with arguments " + Arrays.toString(args), targetException);
         }
     }
 

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java Wed Jan 29 14:48:50 2014
@@ -29,12 +29,12 @@ import java.io.IOException;
 /**
  * Handles the registration (and unregistration and so on) of managed objects.
  *
- * Managed objects are responsible for exposting attributes, operations and notifications. They will expose
+ * Managed objects are responsible for exporting attributes, operations and notifications. They will expose
  * these outside the JVM therefore it is important not to use implementation objects directly as managed objects.
  * Instead, creating inner classes and exposing those is an effective way of exposing internal state in a
  * controlled way.
  *
- * Although we do not explictly use them while targetting Java 5, the enhanced MXBean approach in Java 6 will
+ * Although we do not explicitly use them while targeting Java 5, the enhanced MXBean approach in Java 6 will
  * be the obvious choice for managed objects.
  *
  */

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java Wed Jan 29 14:48:50 2014
@@ -69,7 +69,7 @@ public class QueueMBean extends AMQManag
     private static final CompositeType MSG_DATA_TYPE;
     private static final TabularType MSG_LIST_DATA_TYPE;
     private static final CompositeType MSG_CONTENT_TYPE;
-    private static final String[] VIEW_MSG_COMPOSIT_ITEM_NAMES_ARRAY = VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.toArray(
+    private static final String[] VIEW_MSG_COMPOSITE_ITEM_NAMES_ARRAY = VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.toArray(
             new String[VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.size()]);
 
     static
@@ -396,7 +396,7 @@ public class QueueMBean extends AMQManag
 
         Object[] itemValues = { messageId, mimeType, encoding, msgContent };
 
-        return new CompositeDataSupport(MSG_CONTENT_TYPE, VIEW_MSG_COMPOSIT_ITEM_NAMES_ARRAY, itemValues);
+        return new CompositeDataSupport(MSG_CONTENT_TYPE, VIEW_MSG_COMPOSITE_ITEM_NAMES_ARRAY, itemValues);
 
 
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java Wed Jan 29 14:48:50 2014
@@ -120,7 +120,7 @@ public class UserManagementMBeanTest ext
     {
         boolean reloadSuccess = _userManagement.reloadData();
 
-        assertTrue("Reload should return true to flag succesful update", reloadSuccess);
+        assertTrue("Reload should return true to flag successful update", reloadSuccess);
 
         verify(_mockProvider).reload();
     }

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java Wed Jan 29 14:48:50 2014
@@ -243,7 +243,12 @@ final class IoReceiver implements Runnab
                                   t instanceof SocketException &&
                                   "Socket is closed".equalsIgnoreCase(t.getMessage());
 
-        return !brokenClose && !sslSocketClosed;
+        boolean recvFailed = closed.get() &&
+                             shutdownBroken &&
+                             t instanceof SocketException &&
+                             "Socket operation on nonsocket: recv failed".equalsIgnoreCase(t.getMessage());
+
+        return !brokenClose && !sslSocketClosed && !recvFailed;
     }
 
     public Ticker getTicker()

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/pom.xml?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/pom.xml Wed Jan 29 14:48:50 2014
@@ -135,26 +135,6 @@
       <scope>test</scope>
     </dependency>
 
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>${log4j-version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${slf4j-version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>${slf4j-version}</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <modules>

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/qpid-test-utils/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/qpid-test-utils/pom.xml?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/qpid-test-utils/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/qpid-test-utils/pom.xml Wed Jan 29 14:48:50 2014
@@ -41,6 +41,20 @@
     </dependency>
 
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${slf4j-version}</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>${slf4j-version}</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jms_1.1_spec</artifactId>
       <version>1.0</version>

Modified: qpid/branches/java-broker-bdb-ha/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java?rev=1562466&r1=1562465&r2=1562466&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java (original)
+++ qpid/branches/java-broker-bdb-ha/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java Wed Jan 29 14:48:50 2014
@@ -24,7 +24,7 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.qpid.AMQStoreException;
-import org.apache.qpid.server.message.EnqueableMessage;
+import org.apache.qpid.server.message.EnqueueableMessage;
 import org.apache.qpid.server.message.MessageContentSource;
 import org.apache.qpid.server.model.VirtualHost;
 
@@ -110,13 +110,13 @@ public class
             }
 
             @Override
-            public void enqueueMessage(TransactionLogResource queue, EnqueableMessage message) throws AMQStoreException
+            public void enqueueMessage(TransactionLogResource queue, EnqueueableMessage message) throws AMQStoreException
             {
                 _storeSizeIncrease.addAndGet(((MessageContentSource)message).getSize());
             }
 
             @Override
-            public void dequeueMessage(TransactionLogResource  queue, EnqueableMessage message) throws AMQStoreException
+            public void dequeueMessage(TransactionLogResource  queue, EnqueueableMessage message) throws AMQStoreException
             {
                 _storeSizeIncrease.addAndGet(-((MessageContentSource)message).getSize());
             }
@@ -153,9 +153,11 @@ public class
     @Override
     public void close()
     {
-        _stateManager.attainState(State.CLOSING);
-        _closed.getAndSet(true);
-        _stateManager.attainState(State.CLOSED);
+        if (_closed.compareAndSet(false, true))
+        {
+            _stateManager.attainState(State.CLOSING);
+            _stateManager.attainState(State.CLOSED);
+        }
     }
 
     @Override



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message