diff options
| author | Keith Wall <kwall@apache.org> | 2014-10-03 10:29:53 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-10-03 10:29:53 +0000 |
| commit | 3a3ac8d9be19bde48d7ec56d78ef5306b85dae4d (patch) | |
| tree | 29d76feb6d5b3e4028896d30637608b04a57673d /qpid/java | |
| parent | 89ae6edf669364f29332ff71d3e380b12e16f636 (diff) | |
| download | qpid-python-3a3ac8d9be19bde48d7ec56d78ef5306b85dae4d.tar.gz | |
QPID-6131: [Java Broker] Mark virtualhosts that are being closed as UNAVAILABLE to prevent any new messaging connections being established
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1629177 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
2 files changed, 3 insertions, 2 deletions
diff --git a/qpid/java/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java b/qpid/java/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java index 9e850714b0..38484b546f 100644 --- a/qpid/java/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java +++ b/qpid/java/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java @@ -166,8 +166,8 @@ public class MultiNodeTest extends QpidBrokerTestCase // New connections should now fail as vhost will be unavailable try { - getConnection(_negativeFailoverUrl); - fail("Exception not thrown"); + Connection unexpectedConnection = getConnection(_negativeFailoverUrl); + fail("Got unexpected connection to node in group without quorum " + unexpectedConnection); } catch (JMSException je) { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java index ff6ae19373..48077ba503 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java @@ -678,6 +678,7 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> exte protected void onClose() { + setState(State.UNAVAILABLE); //Stop Connections _connectionRegistry.close(); _dtxRegistry.close(); |
