You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2016/05/09 11:29:57 UTC
svn commit: r1742926 - in
/qpid/java/trunk/client/src/main/java/org/apache/qpid/client:
AMQConnectionDelegate_0_10.java AMQConnectionDelegate_8_0.java
Author: kwall
Date: Mon May 9 11:29:57 2016
New Revision: 1742926
URL: http://svn.apache.org/viewvc?rev=1742926&view=rev
Log:
QPID-7253: [Java Client, 0-10] Take failover mutex when executing operations that may be interrupted by failover
Modified:
qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java?rev=1742926&r1=1742925&r2=1742926&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java Mon May 9 11:29:57 2016
@@ -481,17 +481,22 @@ public class AMQConnectionDelegate_0_10
}
catch (InterruptedException e)
{
- //ignore
+ Thread.currentThread().interrupt();
+ return null;
}
}
- try
+ synchronized (_conn.getFailoverMutex())
{
- return operation.execute();
- }
- catch (FailoverException e)
- {
- throw new RuntimeException(e);
+ try
+ {
+ return operation.execute();
+ }
+ catch (FailoverException e)
+ {
+ // FailoverException never thrown on 0-10 path
+ throw new RuntimeException(e);
+ }
}
}
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java?rev=1742926&r1=1742925&r2=1742926&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java Mon May 9 11:29:57 2016
@@ -66,7 +66,7 @@ public class AMQConnectionDelegate_8_0 i
{
private static final Logger _logger = LoggerFactory.getLogger(AMQConnectionDelegate_8_0.class);
- // deprectaed legacy name for the option
+ // deprecated legacy name for the option
private static final String AMQJ_DEFAULT_SYNCWRITE_TIMEOUT = "amqj.default_syncwrite_timeout";
private final AMQConnection _conn;
@@ -406,7 +406,7 @@ public class AMQConnectionDelegate_8_0 i
catch (InterruptedException e)
{
_logger.debug("Interrupted: " + e, e);
-
+ Thread.currentThread().interrupt();
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org