Skip to content

Commit

Permalink
ARTEMIS-376 NPE during fail-back
Browse files Browse the repository at this point in the history
  • Loading branch information
jbertram committed Feb 4, 2016
1 parent 33b1f72 commit 5a483f9
Showing 1 changed file with 13 additions and 9 deletions.
Expand Up @@ -51,6 +51,7 @@

import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;

public class SharedNothingLiveActivation extends LiveActivation {
Expand Down Expand Up @@ -229,17 +230,20 @@ public void connectionFailed(final ActiveMQException me, boolean failedOver, Str

@Override
public void connectionClosed() {
activeMQServer.getThreadPool().execute(new Runnable() {
@Override
public void run() {
synchronized (replicationLock) {
if (replicationManager != null) {
activeMQServer.getStorageManager().stopReplication();
replicationManager = null;
ExecutorService executorService = activeMQServer.getThreadPool();
if (executorService != null) {
executorService.execute(new Runnable() {
@Override
public void run() {
synchronized (replicationLock) {
if (replicationManager != null) {
activeMQServer.getStorageManager().stopReplication();
replicationManager = null;
}
}
}
}
});
});
}
}
}

Expand Down

0 comments on commit 5a483f9

Please sign in to comment.