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

Jean-Noel Rouvignac
05.14.2013 116f4b6e8d7f84d23869c1717e404d416b67ffd8
opendj-sdk/opends/src/server/org/opends/server/api/DirectoryThread.java
@@ -416,7 +416,6 @@
  public void initiateShutdown()
  {
    setThreadStateIfNotShuttingDown(ThreadState.SHUTTING_DOWN);
    interrupt();
  }
  /**
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java
@@ -347,6 +347,17 @@
  /** {@inheritDoc} */
  @Override
  public void initiateShutdown()
  {
    super.initiateShutdown();
    synchronized (this)
    {
      notify();
    }
  }
  /** {@inheritDoc} */
  @Override
  public void run()
  {
    try
@@ -380,6 +391,10 @@
          {
            synchronized (this)
            {
              if (isShutdownInitiated())
              {
                continue;
              }
              wait();
            }
            // advance cursor, success/failure will be checked later
@@ -400,7 +415,8 @@
            synchronized (this)
            {
              // double check to protect against a missed call to notify()
              if (!canMoveForwardMediumConsistencyPoint(baseDN))
              if (!isShutdownInitiated()
                  && !canMoveForwardMediumConsistencyPoint(baseDN))
              {
                wait();
                // loop to check if changes older than the medium consistency
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java
@@ -363,7 +363,10 @@
              }
              catch (InterruptedException e)
              {
                Thread.currentThread().interrupt();
                // Do not reset the interrupt flag here,
                // because otherwise JE will barf next time flush() is called:
                // JE 5.0.97 refuses to persist changes to the DB when invoked
                // from a Thread with the interrupt flag set to true.
              }
            }
          }