*
* @param e the exception that caused the shutdown
*/
void shutdown(Throwable e)
{
Message msg = new Message(Messages.FATAL_ERROR_WHILE_RUNNING);
UMOException muleException = ExceptionHelper.getRootMuleException(e);
if (muleException != null) {
logger.fatal(muleException.getDetailedMessage());
} else {
logger.fatal(msg.toString() + " " + e.getMessage(), e);
}
List msgs = new ArrayList();
msgs.add(msg.getMessage());
Throwable root = ExceptionHelper.getRootException(e);
msgs.add(root.getMessage() + " (" + root.getClass().getName() + ")");
msgs.add(" ");
msgs.add(new Message(Messages.FATAL_ERROR_SHUTDOWN));
msgs.add(new Message(Messages.SERVER_STARTED_AT_X, new Date(MuleManager.getInstance().getStartDate())));
msgs.add(new Message(Messages.SERVER_SHUTDOWN_AT_X, new Date().toString()));
shutdownMessage = StringMessageHelper.getBoilerPlate(msgs, '*', 80);
logger.fatal(shutdownMessage);
System.exit(0);
}