bug6117 aftermath: migrating finalize() in ReplicationServiceImpl into stop() called by Activator.stop()

This commit is contained in:
Axel Uhl committed 2025-07-09 09:21:20 +02:00
1 parent 20201c5730
commit cf8efc91c9
2 files changed
+6 -6

No files matched your search

@@ -224,6 +224,7 @@ public class Activator implements BundleActivator {
}
// stop sending stuff to the exchange for other replicas (if this is a master)
serverReplicationMasterService.stopAllReplicas();
serverReplicationMasterService.stop();
}
public static BundleContext getDefaultContext() {
@@ -353,12 +353,6 @@ public class ReplicationServiceImpl implements ReplicationService, OperationsToM
}
}
@Override
protected void finalize() {
logger.info("terminating timer " + timer);
timer.cancel();
}
protected ServiceTracker<Replicable<?, ?>, Replicable<?, ?>> getReplicableTracker() {
return new ServiceTracker<Replicable<?, ?>, Replicable<?, ?>>(Activator.getDefaultContext(),
Replicable.class.getName(), null);
@@ -968,4 +962,9 @@ public class ReplicationServiceImpl implements ReplicationService, OperationsToM
return new ReplicationStatusImpl(isReplica, ServerInfo.getName(), isReplicationStarting, suspended, stopped,
messageQueueLength, isInitialLoadRunning, operationQueueLengths, getReplicatingFromMaster(), getReplicaInfo(), exchangeName, exchangePort);
}
public void stop() {
logger.info("terminating timer " + timer);
timer.cancel();
}
}