* activate/deactivate the services
* @return false if an error occurred that required server shutdown; true otherwise
*/
private boolean proceedTo(int runLevel, AppServerActivator activator) {
// set up the run level listener and activator
DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class);
DynamicConfiguration config = dcs.createDynamicConfiguration();
ActiveDescriptor<?> activatorDescriptor = config.addActiveDescriptor(BuilderHelper.createConstantDescriptor(activator));
config.commit();
try {
runLevelController.proceedTo(runLevel);
} catch (Exception e) {
logger.log(Level.SEVERE, KernelLoggerInfo.shutdownRequired, e);
shutdown();
return false;
} finally {
config = dcs.createDynamicConfiguration();
config.addUnbindFilter(BuilderHelper.createSpecificDescriptorFilter(activatorDescriptor));
config.commit();
}
return !activator.isShutdown();
}