private void removeContext(Context context) { context.getParent().removeChild(context); }
private void removeContext(Context context) { context.getParent().removeChild(context); }
public void removeWebService(String contextPath) { TomcatEJBWebServiceContext context = (TomcatEJBWebServiceContext) webServices.get(contextPath); try { context.stop(); context.destroy(); } catch (Exception e) { throw new RuntimeException(e); } context.getParent().removeChild(context); webServices.remove(contextPath); }
public void removeWebService(String contextPath) { TomcatEJBWebServiceContext context = (TomcatEJBWebServiceContext) webServices.get(contextPath); try { context.stop(); context.destroy(); } catch (Exception e) { throw new RuntimeException(e); } context.getParent().removeChild(context); webServices.remove(contextPath); }
/** * Remove an existing child Container from association with this parent * Container. * * @param name Name of the existing child Container to be removed * @throws MBeanException if the child cannot be removed */ public void removeChild(String name) throws MBeanException{ if (name != null) { Container container = doGetManagedResource(); Container contained = container.findChild(name); container.removeChild(contained); } }
/** * Remove an existing child Container from association with this parent * Container. * * @param name Name of the existing child Container to be removed * @throws MBeanException if the child cannot be removed */ public void removeChild(String name) throws MBeanException{ if (name != null) { Container container = doGetManagedResource(); Container contained = container.findChild(name); container.removeChild(contained); } }
public void removeContext(TomcatContext ctx) { Context context = ctx.getContext(); if (context != null) { if (context instanceof GeronimoStandardContext) { GeronimoStandardContext stdctx = (GeronimoStandardContext) context; try { stdctx.kill(); } catch (Exception e) { throw new RuntimeException(e); } } if (context.getParent() != null) { context.getParent().removeChild(context); } } }
private static boolean undeploy(final StandardContext standardContext, final Container host) { final Container child = host.findChild(standardContext.getName()); // skip undeployment if redeploying (StandardContext.redeploy()) if (child instanceof org.apache.catalina.Context && org.apache.catalina.Context.class.cast(child).getPaused()) { return true; } // skip undeployment if restarting final TomEEWebappClassLoader tomEEWebappClassLoader = lazyClassLoader( org.apache.catalina.Context.class.isInstance(child) ? org.apache.catalina.Context.class.cast(child) : null); if (tomEEWebappClassLoader != null && tomEEWebappClassLoader.isRestarting()) { return true; } if (child != null) { host.removeChild(standardContext); return true; } return false; }
public void removeContext(TomcatContext ctx) { Context context = ctx.getContext(); if (context != null) { if (context instanceof GeronimoStandardContext) { GeronimoStandardContext stdctx = (GeronimoStandardContext) context; try { stdctx.stop(); stdctx.destroy(); } catch (Exception e) { throw new RuntimeException(e); } } context.getParent().removeChild(context); } }
/** * {@inheritDoc} */ public void stop() { if (_context != null) { // Destroy the web context unless if it is default if (!_context.getPath().equals("/")) { try { Container container = _context.getParent(); container.removeChild(_context); _context.stop(); _context.destroy(); LOG.info("Destroyed HTTP context " + _context.getPath()); } catch (Exception e) { LOG.error("Unable to destroy web context", e); } } } } }
@Override public synchronized void stop() throws Exception { if (_serverContext != null) { // Destroy the web context unless if it is default if (!_serverContext.getPath().equals("/")) { try { Container container = _serverContext.getParent(); container.removeChild(_serverContext); _serverContext.stop(); _serverContext.destroy(); _log.info("Destroyed HTTP context " + _serverContext.getPath()); } catch (Exception e) { ExtensionLogger.ROOT_LOGGER.unableToDestroyWebContext(_contextName, e); } } } }
@Override public synchronized void stop() throws Exception { if (_serverContext != null) { // Destroy the web context unless if it is default if (!_serverContext.getPath().equals("/")) { try { Container container = _serverContext.getParent(); container.removeChild(_serverContext); _serverContext.stop(); _serverContext.destroy(); _log.info("Destroyed HTTP context " + _serverContext.getPath()); } catch (Exception e) { ExtensionLogger.ROOT_LOGGER.unableToDestroyWebContext(_contextName, e); } } } }
@Override protected void destroyInternal() throws LifecycleException { // Stop the Valves in our pipeline (including the basic), if any if (pipeline instanceof Lifecycle) { ((Lifecycle) pipeline).destroy(); } // Remove children now this container is being destroyed for (Container child : findChildren()) { removeChild(child); } // Required if the child is destroyed directly. if (parent != null) { parent.removeChild(this); } super.destroyInternal(); }
@Override protected void destroyInternal() throws LifecycleException { // Stop the Valves in our pipeline (including the basic), if any if (pipeline instanceof Lifecycle) { ((Lifecycle) pipeline).destroy(); } // Remove children now this container is being destroyed for (Container child : findChildren()) { removeChild(child); } // Required if the child is destroyed directly. if (parent != null) { parent.removeChild(this); } super.destroyInternal(); }
@Override protected void destroyInternal() throws LifecycleException { // Stop the Valves in our pipeline (including the basic), if any if (pipeline instanceof Lifecycle) { ((Lifecycle) pipeline).destroy(); } // Remove children now this container is being destroyed for (Container child : findChildren()) { removeChild(child); } // Required if the child is destroyed directly. if (parent != null) { parent.removeChild(this); } super.destroyInternal(); }
private static void stopWebApp(StandardContext context) throws Exception { try { Container container = context.getParent(); container.removeChild(context); context.stop(); } catch (LifecycleException e) { throw MESSAGES.stopContextPhaseFailed(e); } try { context.destroy(); } catch (Exception e) { throw MESSAGES.destroyContextPhaseFailed(e); } }
private void stopWebApp(StandardContext context) throws Exception { try { Container container = context.getParent(); container.removeChild(context); context.stop(); } catch (LifecycleException e) { throw MESSAGES.stopContextPhaseFailed(e); } try { context.destroy(); } catch (Exception e) { throw MESSAGES.destroyContextPhaseFailed(e); } }
/** * Remove an existing child Container from association with this parent * Container. * * @param name Name of the existing child Container to be removed */ public void removeChild(String name) throws MBeanException{ if(name != null){ try { Container container = (Container)getManagedResource(); Container contained = container.findChild(name); container.removeChild(contained); } catch (InstanceNotFoundException e) { throw new MBeanException(e); } catch (RuntimeOperationsException e) { throw new MBeanException(e); } catch (InvalidTargetObjectTypeException e) { throw new MBeanException(e); } } }
/** * Remove an existing child Container from association with this parent * Container. * * @param name Name of the existing child Container to be removed */ public void removeChild(String name) throws MBeanException{ if(name != null){ try { Container container = (Container)getManagedResource(); Container contained = container.findChild(name); container.removeChild(contained); } catch (InstanceNotFoundException e) { throw new MBeanException(e); } catch (RuntimeOperationsException e) { throw new MBeanException(e); } catch (InvalidTargetObjectTypeException e) { throw new MBeanException(e); } } }
@Override public synchronized void removeContext(Context context) { if( log.isDebugEnabled() ) log.debug("Removing context[" + context.getPath() + "]"); boolean isContextExists = isContextExists(context); if(!isContextExists) return; // Remove this Context from the associated Host if( log.isDebugEnabled() ) log.debug(" Removing this Context"); context.getParent().removeChild(context); }