public void destroy() throws Exception { // destroy our child containers, if any Container children[] = findChildren(); super.destroy(); for (int i = 0; i < children.length; i++) { if(children[i] instanceof StandardContext) ((StandardContext)children[i]).destroy(); } }
public synchronized void destroy() throws Exception { // destroy our child containers, if any Container children[] = findChildren(); super.destroy(); for (int i = 0; i < children.length; i++) { if(children[i] instanceof StandardContext) ((StandardContext)children[i]).destroy(); } }
public void removeWsContainer(String path) { if (path == null) return; // assure context root with a leading slash if (!path.startsWith("/")) path = "/" + path; StandardContext context = webserviceContexts.remove(path); try { context.stop(); context.destroy(); } catch (Exception e) { throw new RuntimeException(e); } Host host = (Host) context.getParent(); host.removeChild(context); }
public synchronized void destroy() throws Exception { // destroy our child containers, if any Container children[] = findChildren(); super.destroy(); for (int i = 0; i < children.length; i++) { if(children[i] instanceof StandardContext) ((StandardContext)children[i]).destroy(); } }
if(context instanceof StandardContext) try { ((StandardContext)context).destroy(); } catch (Exception e) { log.warn("Error during context [" + context.getName() + "] destroy ", e);
/** * {@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); } } } } }
/** * {@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); } } } } }
if(context instanceof StandardContext) try { ((StandardContext)context).destroy(); } catch (Exception e) { log.warn("Error during context [" + context.getName() + "] destroy ", e);
if(context instanceof StandardContext) try { ((StandardContext)context).destroy(); } catch (Exception e) { log.warn("Error during context [" + context.getName() + "] destroy ", e);
void unregisterInternal(Registration reg) { StandardContext context = reg.getContext(); try { context.stop(); } catch (LifecycleException e) { WEB_LOGGER.stopContextFailed(e); } try { context.destroy(); } catch (Exception e) { WEB_LOGGER.destroyContextFailed(e); } }
if(context instanceof StandardContext) try { ((StandardContext)context).destroy(); } catch (Exception e) { log.warn("Error during context [" + context.getName() + "] destroy ", e);
if(context instanceof StandardContext) try { ((StandardContext)context).destroy(); } catch (Exception e) { log.warn("Error during context [" + context.getName() + "] destroy ", 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); } } } }
} finally { try { ctx.destroy(); } catch (Exception e) { log.error("Could not destroy context", 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); } }
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); } }
/** * {@inheritDoc} */ public void stop() { if ((_context != null) && _context.isStarted()) { Registry registry = (Registry)_context.getServletContext().getAttribute(Registry.class.getName()); if (registry != null) { // Remove registrations for (Class<?> clazz : _classes) { LOG.debug("Stopping ... " + clazz); registry.removeRegistrations(clazz); } // Destroy the web context unless if it is default if ((registry.getSize() == 0) && (!_context.getPath().equals("/"))) { try { Container container = _context.getParent(); container.removeChild(_context); _context.stop(); _context.destroy(); LOG.info("Destroyed RESTEasy context " + _context.getPath()); } catch (Exception e) { ExtensionLogger.ROOT_LOGGER.unableToDestroyWebContext(_context.getPath(), e); } } } } } }
/** * {@inheritDoc} */ public void stop() { if ((_context != null) && _context.isStarted()) { Registry registry = (Registry)_context.getServletContext().getAttribute(Registry.class.getName()); if (registry != null) { // Remove registrations for (Class<?> clazz : _classes) { LOG.debug("Stopping ... " + clazz); registry.removeRegistrations(clazz); } // Destroy the web context unless if it is default if ((registry.getSize() == 0) && (!_context.getPath().equals("/"))) { try { Container container = _context.getParent(); container.removeChild(_context); _context.stop(); _context.destroy(); LOG.info("Destroyed RESTEasy context " + _context.getPath()); } catch (Exception e) { ExtensionLogger.ROOT_LOGGER.unableToDestroyWebContext(_context.getPath(), e); } } } } } }
public void deactivate(URI uri) throws WebApplicationActivationException { String contextPath = mappings.remove(uri); if (contextPath == null) { throw new WebApplicationActivationException("Context not registered for component: " + uri); } StandardContext context = null; try { for (Container container : connector.getContainer().findChildren()) { if (container instanceof StandardHost) { context = (StandardContext) container.findChild(contextPath); container.removeChild(context); try { context.destroy(); } catch (Exception e) { throw new WebApplicationActivationException(e); } break; } } if (context == null) { throw new WebApplicationActivationException("Context not found for: " + contextPath); } context.stop(); monitor.deactivated(contextPath); } catch (LifecycleException e) { throw new WebApplicationActivationException(e); } }