ARTEMIS-376 NPE during fail-back
This commit is contained in:
parent
33b1f7275c
commit
5a483f922a
|
@ -51,6 +51,7 @@ import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class SharedNothingLiveActivation extends LiveActivation {
|
public class SharedNothingLiveActivation extends LiveActivation {
|
||||||
|
@ -229,17 +230,20 @@ public class SharedNothingLiveActivation extends LiveActivation {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void connectionClosed() {
|
public void connectionClosed() {
|
||||||
activeMQServer.getThreadPool().execute(new Runnable() {
|
ExecutorService executorService = activeMQServer.getThreadPool();
|
||||||
@Override
|
if (executorService != null) {
|
||||||
public void run() {
|
executorService.execute(new Runnable() {
|
||||||
synchronized (replicationLock) {
|
@Override
|
||||||
if (replicationManager != null) {
|
public void run() {
|
||||||
activeMQServer.getStorageManager().stopReplication();
|
synchronized (replicationLock) {
|
||||||
replicationManager = null;
|
if (replicationManager != null) {
|
||||||
|
activeMQServer.getStorageManager().stopReplication();
|
||||||
|
replicationManager = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue