ClassLoader old = current.getContextClassLoader();
try {
current.setContextClassLoader(wac.getClassLoader());
wac.stop();
if (contexts != null) {
contexts.removeHandler(wac);
}
log.info("Context [" + contextPath + "] undeployed successfully from server " + getServerInfo());
}
catch (Exception ex) {
throw new OsgiWarDeploymentException("Cannot undeploy " + messageEnding, ex);