You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/02/21 21:24:17 UTC
svn commit: r1570699 - in /qpid/trunk/qpid/java:
broker-core/src/main/java/org/apache/qpid/server/virtualhost/
broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/
broker-plugins/amqp-0-8-protocol/src/main/java/org/apach...
Author: rgodfrey
Date: Fri Feb 21 20:24:16 2014
New Revision: 1570699
URL: http://svn.apache.org/r1570699
Log:
QPID-5551 : Address review comments from Robbie Gemmell
Modified:
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ExchangeRecoverer.java
qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicConsumeMethodHandler.java
Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ExchangeRecoverer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ExchangeRecoverer.java?rev=1570699&r1=1570698&r2=1570699&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ExchangeRecoverer.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ExchangeRecoverer.java Fri Feb 21 20:24:16 2014
@@ -66,7 +66,6 @@ public class ExchangeRecoverer extends A
final Map<String, Object> attributeMap)
{
String exchangeName = (String) attributeMap.get(org.apache.qpid.server.model.Exchange.NAME);
- String lifeTimePolicy = (String) attributeMap.get(org.apache.qpid.server.model.Exchange.LIFETIME_POLICY);
try
{
_exchange = _exchangeRegistry.getExchange(id);
Modified: qpid/trunk/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/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java?rev=1570699&r1=1570698&r2=1570699&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java Fri Feb 21 20:24:16 2014
@@ -319,12 +319,31 @@ public class AMQProtocolEngine implement
private void receivedComplete()
{
+ RuntimeException exception = null;
+
for (AMQChannel<AMQProtocolEngine> channel : _channelsForCurrentMessage)
{
- channel.receivedComplete();
+ try
+ {
+ channel.receivedComplete();
+ }
+ catch(RuntimeException exceptionForThisChannel)
+ {
+ if(exception == null)
+ {
+ exception = exceptionForThisChannel;
+ }
+ _logger.error("Error informing channel that receiving is complete. Channel: " + channel,
+ exceptionForThisChannel);
+ }
}
_channelsForCurrentMessage.clear();
+
+ if(exception != null)
+ {
+ throw exception;
+ }
}
/**
Modified: qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicConsumeMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicConsumeMethodHandler.java?rev=1570699&r1=1570698&r2=1570699&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicConsumeMethodHandler.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicConsumeMethodHandler.java Fri Feb 21 20:24:16 2014
@@ -155,31 +155,31 @@ public class BasicConsumeMethodHandler i
}
catch (AMQQueue.ExistingExclusiveConsumer e)
{
- throw body.getChannelException(AMQConstant.ACCESS_REFUSED,
- "Cannot subscribe to queue "
- + queue.getName()
- + " as it already has an existing exclusive consumer");
+ throw body.getConnectionException(AMQConstant.ACCESS_REFUSED,
+ "Cannot subscribe to queue "
+ + queue.getName()
+ + " as it already has an existing exclusive consumer");
}
catch (AMQQueue.ExistingConsumerPreventsExclusive e)
{
- throw body.getChannelException(AMQConstant.ACCESS_REFUSED,
- "Cannot subscribe to queue "
- + queue.getName()
- + " exclusively as it already has a consumer");
+ throw body.getConnectionException(AMQConstant.ACCESS_REFUSED,
+ "Cannot subscribe to queue "
+ + queue.getName()
+ + " exclusively as it already has a consumer");
}
catch (AccessControlException e)
{
- throw body.getChannelException(AMQConstant.ACCESS_REFUSED,
- "Cannot subscribe to queue "
- + queue.getName()
- + " permission denied");
+ throw body.getConnectionException(AMQConstant.ACCESS_REFUSED,
+ "Cannot subscribe to queue "
+ + queue.getName()
+ + " permission denied");
}
catch (MessageSource.ConsumerAccessRefused consumerAccessRefused)
{
- throw body.getChannelException(AMQConstant.ACCESS_REFUSED,
- "Cannot subscribe to queue "
- + queue.getName()
- + " as it already has an incompatible exclusivity policy");
+ throw body.getConnectionException(AMQConstant.ACCESS_REFUSED,
+ "Cannot subscribe to queue "
+ + queue.getName()
+ + " as it already has an incompatible exclusivity policy");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org