mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-08 19:15:08 +00:00
ARTEMIS-4030 Fix SharedStoreLiveActivation race condition
DefaultCriticalErrorListener stops the server while SharedStoreLiveActivation is initializing it. (cherry picked from commit 3a5e4ce36300573525b96b101b69a0a287e1a8ea)
This commit is contained in:
parent
902e912f0d
commit
f81134d748
@ -85,16 +85,18 @@ public final class SharedStoreLiveActivation extends LiveActivation {
|
||||
nodeManagerActivateCallback = activeMQServer.getNodeManager().startLiveNode();
|
||||
activeMQServer.registerActivateCallback(nodeManagerActivateCallback);
|
||||
|
||||
if (activeMQServer.getState() == ActiveMQServerImpl.SERVER_STATE.STOPPED
|
||||
synchronized (activeMQServer) {
|
||||
if (activeMQServer.getState() == ActiveMQServerImpl.SERVER_STATE.STOPPED
|
||||
|| activeMQServer.getState() == ActiveMQServerImpl.SERVER_STATE.STOPPING) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
activeMQServer.initialisePart2(false);
|
||||
|
||||
activeMQServer.completeActivation(false);
|
||||
|
||||
ActiveMQServerLogger.LOGGER.serverIsLive();
|
||||
}
|
||||
|
||||
activeMQServer.initialisePart2(false);
|
||||
|
||||
activeMQServer.completeActivation(false);
|
||||
|
||||
ActiveMQServerLogger.LOGGER.serverIsLive();
|
||||
} catch (NodeManagerException nodeManagerException) {
|
||||
if (nodeManagerException.getCause() instanceof ClosedChannelException) {
|
||||
// this is ok, we are being stopped
|
||||
|
Loading…
x
Reference in New Issue
Block a user