/* */ }
/* */ }
/* */
/* */ protected void destroyService() throws Exception
/* */ {
/* 518 */ WebServiceMBean webServer = null;
/* 519 */ if (this.webServiceName != null)
/* */ {
/* 521 */ webServer = (WebServiceMBean)MBeanProxyExt.create(WebServiceMBean.class, this.webServiceName);
/* */ }
/* */
/* 525 */ ListIterator iter = this.containerOrdering.listIterator(this.containerOrdering.size());
/* */
/* 527 */ String contextID = this.appMetaData.getJaccContextID();
/* */
/* 529 */ String securityDomain = SecurityUtil.unprefixSecurityDomain(this.appMetaData.getSecurityDomain());
/* 530 */ if (securityDomain != null)
/* */ {
/* 533 */ InitialContext ic = new InitialContext();
/* 534 */ String amCtx = "java:/jaas/" + securityDomain + "/authorizationMgr";
/* */ try
/* */ {
/* 537 */ AuthorizationManager authzmgr = (AuthorizationManager)ic.lookup(amCtx);
/* 538 */ if ((authzmgr instanceof PolicyRegistration))
/* */ {
/* 540 */ PolicyRegistration xam = (PolicyRegistration)authzmgr;
/* 541 */ xam.deRegisterPolicy(contextID);
/* */ }
/* */ }
/* */ catch (ClassCastException cce)
/* */ {
/* 546 */ log.trace("CCE experienced in looking up authorization manager for " + securityDomain, cce);
/* */ }
/* */ }
/* */
/* 550 */ while (iter.hasPrevious())
/* */ {
/* 552 */ Container con = (Container)iter.previous();
/* 553 */ ObjectName jmxName = con.getJmxName();
/* 554 */ int conState = con.getState();
/* 555 */ boolean destroyContainer = true;
/* 556 */ log.debug("Looking to destroy container: " + jmxName + ", state: " + con.getStateString() + ", destroy: " + destroyContainer);
/* */
/* 560 */ int jmxHash = jmxName.hashCode();
/* 561 */ Registry.unbind(new Integer(jmxHash));
/* */
/* 566 */ if (webServer != null)
/* */ {
/* 568 */ ClassLoader wcl = con.getWebClassLoader();
/* 569 */ if (wcl != null)
/* */ {
/* */ try
/* */ {
/* 573 */ webServer.removeClassLoader(wcl);
/* */ }
/* */ catch (Throwable e)
/* */ {
/* 577 */ log.warn("Failed to unregister webClassLoader", e);
/* */ }