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

boli
08.19.2006 5c3196a7dc35588f22aa086e4e5cf6a563ec0de0
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -344,35 +344,23 @@
    // Preload the database cache.
    rootContainer.preload();
    // Determine the next entry ID and the total number of entries.
    EntryID highestID = null;
    long entryCount = 0;
    for (EntryContainer ec : rootContainer.getEntryContainers())
    try
    {
      try
      {
        EntryID id = ec.getHighestEntryID();
        if (highestID == null || id.compareTo(highestID) > 0)
        {
          highestID = id;
        }
        entryCount += ec.getEntryCount();
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "initializeBackend", e);
        String message = getMessage(MSGID_JEB_HIGHEST_ID_FAIL);
        throw new InitializationException(MSGID_JEB_HIGHEST_ID_FAIL,
                                          message, e);
      }
      // Log an informational message about the number of entries.
      int msgID = MSGID_JEB_BACKEND_STARTED;
      String message = getMessage(msgID, rootContainer.getEntryCount());
      logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.NOTICE, message,
               msgID);
    }
    EntryID.initialize(highestID);
    // Log an informational message about the number of entries.
    int msgID = MSGID_JEB_BACKEND_STARTED;
    String message = getMessage(msgID, entryCount);
    logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.NOTICE, message,
             msgID);
    catch(DatabaseException databaseException)
    {
      assert debugException(CLASS_NAME, "initializeBackend",
                            databaseException);
      String message = getMessage(MSGID_JEB_GET_ENTRY_COUNT_FAILED,
                                  databaseException.getMessage());
      throw new InitializationException(MSGID_JEB_GET_ENTRY_COUNT_FAILED,
                                        message, databaseException);
    }
    // Register this backend as a configurable component.
    DirectoryServer.registerConfigurableComponent(this);
@@ -400,6 +388,7 @@
    assert debugEnter(CLASS_NAME, "finalizeBackend");
    // Deregister our configurable components.
    // TODO: configurableEnv is always null and will not be deregistered.
    if (configurableEnv != null)
    {
      DirectoryServer.deregisterConfigurableComponent(configurableEnv);