mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

mrossign
24.28.2008 52635206c54376a391a2d9b55e37b89ce2d3edfa
Fix for #2863: Processes remain after stopping all replication servers at the same time
3 files modified
36 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ListenerThread.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java 22 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ListenerThread.java
@@ -134,7 +134,12 @@
        logError(message);
      }
    }
    // Stop the HeartBeat thread
    repDomain.getBroker().stopHeartBeat();
    done = true;
    if (debugEnabled())
    {
      TRACER.debugInfo("Replication Listener thread stopping.");
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
@@ -204,11 +204,7 @@
    HashMap<String, ServerState> rsStates = new HashMap<String, ServerState>();
    // Stop any existing heartbeat monitor from a previous session.
    if (heartbeatMonitor != null)
    {
      heartbeatMonitor.shutdown();
      heartbeatMonitor = null;
    }
    stopHeartBeat();
    synchronized (connectPhaseLock)
    {
@@ -753,6 +749,18 @@
  }
  /**
   * Stop the heartbeat monitor thread.
   */
  void stopHeartBeat()
  {
    if (heartbeatMonitor != null)
    {
      heartbeatMonitor.shutdown();
      heartbeatMonitor = null;
    }
  }
  /**
   * restart the ReplicationBroker.
   */
  public void reStart()
@@ -987,10 +995,6 @@
    replicationServer = "stopped";
    shutdown = true;
    connected = false;
    if (heartbeatMonitor != null)
    {
      heartbeatMonitor.shutdown();
    }
    try
    {
      if (debugEnabled())
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -2865,6 +2865,15 @@
    return DirectoryServer.getBackend(baseDN);
  }
  /**
   * Get the internal broker to perform some operations on it.
   *
   * @return The broker for this domain.
   */
  ReplicationBroker getBroker()
  {
    return broker;
  }
  /**
   * Exports an entry in LDIF format.