示例#1
0
  /**
   * This method must not be called before the server has completed initialization. That's the only
   * way we can be confident that the DOManager is present, and ready to create the repository has
   * that we will compare to.
   */
  private String getRepositoryHash() throws JournalException {
    if (!server.hasInitialized()) {
      throw new IllegalStateException(
          "The repository hash is not available until " + "the server is fully initialized.");
    }

    try {
      return server.getRepositoryHash();
    } catch (ServerException e) {
      throw new JournalException(e);
    }
  }
示例#2
0
 /** Get the ManagementDelegate module and pass it to the worker. */
 @Override
 public void postInitModule() throws ModuleInitializationException {
   ManagementDelegate delegate = serverInterface.getManagementDelegate();
   if (delegate == null) {
     throw new ModuleInitializationException(
         "Can't get a ManagementDelegate from Server.getModule()", getRole());
   }
   worker.setManagementDelegate(delegate);
 }