You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2016/05/10 21:42:43 UTC
[2/2] qpid-jms git commit: QPIDJMS-175 Use a more appropriate
exception on the drain timeout.
QPIDJMS-175 Use a more appropriate exception on the drain timeout.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/0fe6b047
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/0fe6b047
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/0fe6b047
Branch: refs/heads/master
Commit: 0fe6b0471495821432f5e047c69287980edf6dac
Parents: 1b05e92
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue May 10 17:41:59 2016 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue May 10 17:41:59 2016 -0400
----------------------------------------------------------------------
.../java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/0fe6b047/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
index a8ef32d..f7a7200 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
@@ -32,6 +32,7 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.jms.JMSException;
import org.apache.qpid.jms.JmsDestination;
+import org.apache.qpid.jms.JmsOperationTimedOutException;
import org.apache.qpid.jms.message.JmsInboundMessageDispatch;
import org.apache.qpid.jms.message.JmsMessage;
import org.apache.qpid.jms.meta.JmsConsumerId;
@@ -120,9 +121,9 @@ public class AmqpConsumer extends AmqpAbstractResource<JmsConsumerInfo, Receiver
@Override
public void run() {
LOG.trace("Consumer {} drain request timed out", getConsumerId());
- IOException error = new IOException("Remote did not respond to a drain request in time");
- locallyClosed(session.getProvider(), error);
- stopRequest.onFailure(error);
+ Exception cause = new JmsOperationTimedOutException("Remote did not respond to a drain request in time");
+ locallyClosed(session.getProvider(), cause);
+ stopRequest.onFailure(cause);
session.getProvider().pumpToProtonTransport(stopRequest);
}
}, getDrainTimeout());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org