}
public void doStop(Bundle bundle, String servletContextName) {
EventUtil.sendEvent(bundle, EventUtil.UNDEPLOYING, null, false);
BundleServletContext bundleServletContext = null;
ServletContext servletContext = ServletContextPool.get(
servletContextName);
if ((servletContext != null) &&
(servletContext instanceof BundleServletContext)) {
bundleServletContext = (BundleServletContext)servletContext;
}
if (bundleServletContext == null) {
EventUtil.sendEvent(bundle, EventUtil.UNDEPLOYED, null, false);
return;
}
try {
bundleServletContext.close();
}
catch (Exception e) {
EventUtil.sendEvent(bundle, EventUtil.FAILED, null, false);
}