// As it stands Tomcat will respond to the placement or removal of the physical Web App itself. We
// call removeServiced prior to the file delete to let TC know to stop servicing the app, hopefully
// for a cleaner removal.
// There is no additional MBean interaction required, the deploy is done in a file-based way.
TomcatApplicationDeployer deployer = getDeployer();
if (null == deployer) {
throw new IllegalStateException("Unable to undeploy " + contextRoot + ", because Deployer MBean could "
+ "not be accessed - this should never happen.");
}
deployer.undeploy(contextRoot);
}