if (tomcatDeployer == null)
throw new IllegalStateException("Must set TomcatDeployer before stopping");
// Hot undeploy
final LifecycleState currentState = (LifecycleState) server.getAttribute(ServerImplMBean.OBJECT_NAME, "State");
boolean inShutdown = currentState.equals(LifecycleState.STOPPING);
if (!inShutdown || connectorsRunning)
{
log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, stopping connectors now");
stopConnectors();