protected int processLocal(boolean initializeServer,
PrintStream out,
PrintStream err) {
// Perform the initial bootstrap of the Directory Server and process the
// configuration.
DirectoryServer directoryServer = DirectoryServer.getInstance();
if (initializeServer)
{
try
{
DirectoryServer.bootstrapClient();
DirectoryServer.initializeJMX();
}
catch (Exception e)
{
Message message = ERR_SERVER_BOOTSTRAP_ERROR.get(
getExceptionMessage(e));
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
try
{
directoryServer.initializeConfiguration(configClass.getValue(),
configFile.getValue());
}
catch (InitializationException ie)
{
Message message = ERR_CANNOT_LOAD_CONFIG.get(ie.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
Message message = ERR_CANNOT_LOAD_CONFIG.get(getExceptionMessage(e));
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
// Initialize the Directory Server schema elements.
try
{
directoryServer.initializeSchema();
}
catch (ConfigException ce)
{
Message message = ERR_CANNOT_LOAD_SCHEMA.get(ce.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (InitializationException ie)
{
Message message = ERR_CANNOT_LOAD_SCHEMA.get(ie.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
Message message = ERR_CANNOT_LOAD_SCHEMA.get(getExceptionMessage(e));
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
// Initialize the Directory Server core configuration.
try
{
CoreConfigManager coreConfigManager = new CoreConfigManager();
coreConfigManager.initializeCoreConfig();
}
catch (ConfigException ce)
{
Message message = ERR_CANNOT_INITIALIZE_CORE_CONFIG.get(
ce.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (InitializationException ie)
{
Message message = ERR_CANNOT_INITIALIZE_CORE_CONFIG.get(
ie.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
catch (Exception e)
{
Message message = ERR_CANNOT_INITIALIZE_CORE_CONFIG.get(
getExceptionMessage(e));
err.println(wrapText(message, MAX_LINE_WIDTH));
return 1;
}
// Initialize the Directory Server crypto manager.
try
{
directoryServer.initializeCryptoManager();
}
catch (ConfigException ce)
{
Message message = ERR_CANNOT_INITIALIZE_CRYPTO_MANAGER.get(
ce.getMessage());