diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java index c05e6faf53..f96da300ff 100644 --- a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java +++ b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java @@ -25,6 +25,7 @@ import org.apache.qpid.framing.AMQMethodBody; import org.apache.qpid.protocol.AMQMethodEvent; import org.apache.qpid.protocol.AMQMethodListener; import org.apache.qpid.client.protocol.AMQProtocolSession; +import org.apache.qpid.client.failover.FailoverException; public abstract class BlockingMethodFrameListener implements AMQMethodListener { @@ -52,6 +53,7 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener /** * This method is called by the MINA dispatching thread. Note that it could * be called before blockForFrame() has been called. + * * @param evt the frame event * @return true if the listener has dealt with this frame * @throws AMQException @@ -109,11 +111,15 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener { if (_error instanceof AMQException) { - throw (AMQException)_error; + throw(AMQException) _error; + } + else if (_error instanceof FailoverException) + { + throw (FailoverException)_error; // needed to expose FailoverException. } else { - throw new AMQException("Woken up due to " + _error.getClass(), _error); // FIXME: This will wrap FailoverException and prevent it being caught. + throw new AMQException("Woken up due to " + _error.getClass(), _error); } } @@ -123,6 +129,7 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener /** * This is a callback, called by the MINA dispatcher thread only. It is also called from within this * class to avoid code repetition but again is only called by the MINA dispatcher thread. + * * @param e */ public void error(Exception e) |