diff options
| author | Keith Wall <kwall@apache.org> | 2014-05-21 11:05:21 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-05-21 11:05:21 +0000 |
| commit | 18db9663c7c73af9d1dc5a82478419f56f597851 (patch) | |
| tree | b8bf591fdfd85ede99bcdd6eea89766e36b355a9 /qpid/java/broker-core/src | |
| parent | 6619d55f7d03e67df6f9f2956779c33d1de66776 (diff) | |
| download | qpid-python-18db9663c7c73af9d1dc5a82478419f56f597851.tar.gz | |
QPID-5715: [Java Broker] Make virtualhosts respect the states ACTIVE and STOPPED
* Add state transition tests for BDBHA virtualhostnode / virtualhost
* Prevent the BDBVHN activating the VH (this is now a responsibility of attain desired state)
* BDBHARemoteReplicationNode use state UNAVAILABLE in the case where the remote node is not MASTER or REPLICA.
Work by Andrew MacBean <andymacbean@gmail.com> and me.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1596536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-core/src')
| -rw-r--r-- | qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java | 6 |
1 files changed, 3 insertions, 3 deletions
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 2bec380820..86c19941f8 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 @@ -1209,7 +1209,7 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> exte return _housekeepingThreadCount; } - @StateTransition( currentState = { State.ACTIVE, State.ERRORED, State.UNINITIALIZED }, desiredState = State.STOPPED ) + @StateTransition( currentState = { State.UNINITIALIZED, State.ACTIVE, State.ERRORED }, desiredState = State.STOPPED ) protected void doStop() { closeChildren(); @@ -1219,7 +1219,7 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> exte } - @StateTransition( currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED }, desiredState = State.DELETED ) + @StateTransition( currentState = { State.ACTIVE, State.ERRORED }, desiredState = State.DELETED ) private void doDelete() { if(_deleted.compareAndSet(false,true)) @@ -1400,7 +1400,7 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> exte getDurableConfigurationStore().create(new ConfiguredObjectRecordImpl(record.getId(), record.getType(), record.getAttributes())); } - @StateTransition( currentState = {State.UNINITIALIZED, State.ERRORED, State.QUIESCED, State.STOPPED}, desiredState = State.ACTIVE ) + @StateTransition( currentState = { State.UNINITIALIZED, State.STOPPED, State.ERRORED }, desiredState = State.ACTIVE ) private void onActivate() { _houseKeepingTasks = new ScheduledThreadPoolExecutor(getHousekeepingThreadCount()); |
