localStrings.getString( "admin.server.core.mbean.config.no_such_event",
new Integer(eventType) );
throw new RuntimeException( msg );
}
} catch (ConfigException ex) {
DeploymentException de = new DeploymentException(ex.getMessage());
de.initCause(ex);
throw de;
}
//set target destination for the event
if (targetName != null) {
event.setTargetDestination(targetName);
}
if (event instanceof ApplicationDeployEvent
|| event instanceof ModuleDeployEvent) {
AdminEventCache.populateConfigChange(getConfigContext(), event);
}
if (sLogger.isLoggable(Level.FINEST)) {
sLogger.log(Level.FINEST, "mbean.event_sent", event.getEventInfo());
} else {
sLogger.log(Level.FINE, "mbean.send_event", event.toString());
}
AdminEventResult multicastResult =
AdminEventMulticaster.multicastEvent(event);
sLogger.log(Level.FINE, "mbean.event_res",
multicastResult.getResultCode());
sLogger.log(Level.FINE, "mbean.event_reply",
multicastResult.getAllMessagesAsString());
boolean eventSuccess = true;
//ALREADY SET in Admin Event Multicaster
//AdminEventCache cache =
// AdminEventCache.getInstance(mInstanceName);
//cache.setRestartNeeded(true);
// if there is an exception thrown when loading modules
// rethrow the exception
AdminEventListenerException ale = null;
ale = multicastResult.getFirstAdminEventListenerException();
if (ale != null) {
sLogger.log(Level.WARNING, "mbean.event_failed",
ale.getMessage());
DeploymentException de =
new DeploymentException(ale.getMessage());
de.initCause(ale);
throw de;
}
return eventSuccess;
}