From 3a2fb8fbf8b986016429073370d5fe41a23dc3c2 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 02 Sep 2007 01:12:13 +0000
Subject: [PATCH] Update the server so that it has the ability to save a copy of its current configuration into a ".startok" file whenever it starts successfully.  The start-ds script and DirectoryEnvironmentConfig class have been updated to expose an option to try to start the server using this "last known good" configuration rather than the active config file.

---
 opendj-sdk/opends/src/server/org/opends/server/api/ConfigHandler.java |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/api/ConfigHandler.java b/opendj-sdk/opends/src/server/org/opends/server/api/ConfigHandler.java
index 5c8701e..5f1a563 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/api/ConfigHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/api/ConfigHandler.java
@@ -132,5 +132,25 @@
    */
   public abstract void writeUpdatedConfig()
          throws DirectoryException;
+
+
+
+  /**
+   * Indicates that the Directory Server has started successfully and
+   * that the configuration handler should save a copy of the current
+   * configuration for use as a "last known good" reference.  Note
+   * that this may not be possible with some kinds of configuration
+   * repositories, so it should be a best effort attempt.
+   * <BR><BR>
+   * This method should only be called by the Directory Server itself
+   * when the server has started successfully.  It should not be
+   * invoked by any other component at any other time.
+   */
+  @org.opends.server.types.PublicAPI(
+       stability=org.opends.server.types.StabilityLevel.VOLATILE,
+       mayInstantiate=false,
+       mayExtend=true,
+       mayInvoke=false)
+  public abstract void writeSuccessfulStartupConfig();
 }
 

--
Gitblit v1.10.0