@Override public void undeployConfig() { this.manager.undeploy(); }
@Override public void stop() throws WebServerException { synchronized (this.monitor) { if (!this.started) { return; } this.started = false; try { this.manager.stop(); this.manager.undeploy(); this.undertow.stop(); } catch (Exception ex) { throw new WebServerException("Unable to stop undertow", ex); } } }
public void stopContext() { final ClassLoader old = Thread.currentThread().getContextClassLoader(); DeploymentInfo deploymentInfo = deploymentInfoInjectedValue.getValue(); Thread.currentThread().setContextClassLoader(deploymentInfo.getClassLoader()); try { if (deploymentManager != null) { Deployment deployment = deploymentManager.getDeployment(); try { host.getValue().unregisterDeployment(deployment); deploymentManager.stop(); } catch (ServletException e) { throw new RuntimeException(e); } deploymentManager.undeploy(); container.getValue().getServletContainer().removeDeployment(deploymentInfoInjectedValue.getValue()); } recursiveDelete(deploymentInfoInjectedValue.getValue().getTempDir()); } finally { Thread.currentThread().setContextClassLoader(old); } }
@Override public void destroy() throws Exception { manager.undeploy(); ServletContainer container = server.getValue().getServletContainer().getValue().getServletContainer(); container.removeDeployment(deploymentInfo); } }
@Override public void stop() { if (server != null) { try { String version = server.getClass().getPackage().getImplementationVersion(); log.info("Stopping Undertow {} on port {}", version, getSettings().getPort()); server.stop(); pippoDeploymentManager.undeploy(); } catch (Exception e) { throw new PippoRuntimeException(e, "Cannot stop Undertow Server"); } } }
/** * Stop server. */ public static void stopServer() { if (server == null) { throw new IllegalStateException("Server has not been started yet"); } LOGGER.info("Stopping server"); deploymentManager.undeploy(); server.stop(); LOGGER.info("Server stopped"); } }
protected void stopImpl() { if (server != null) { try { String version = server.getClass().getPackage().getImplementationVersion(); log.info("Stopping Undertow {}", version); server.stop(); fathomDeploymentManager.undeploy(); } catch (Exception e) { throw new FathomException(e); } } }
@Override public void destroy() { logger.info("Shutting down system"); try { // calls Servlet.destroy that is GuiceRsApplicationServlet.destroy defined at // RESTEasy HttpServlet30Dispatcher class deployment.stop(); } catch (ServletException ex) { throw Throwables.propagate(ex); } finally { // calls ServletContextListener.contextDestroyed that calls @PreDestroy hooks // through GuiceRsServletContainerInitializer.CloseableInjectorDestroyListener listener deployment.undeploy(); } } }
private void undeploy() throws Exception { if (deploymentManager != null) { try { deploymentManager.stop(); deploymentManager.undeploy(); } catch (ServletException | RuntimeException e) { unwrapUndertowException(e); } finally { httpHandler = null; deploymentManager = null; } } }
@Override public boolean stop() { deploymentManager.undeploy(); servletContainer.removeDeployment(deploymentInfo); if (pathHandler != null) { pathHandler.clearPaths(); } if (undertow != null) { undertow.stop(); } return true; }
manager.stop(); if (manager.getState() == DeploymentManager.State.DEPLOYED) manager.undeploy(); } catch (Exception e) { LOGGER.log(Level.WARNING, e, () -> "Cannot stop the manager: " + e.getMessage());
public void run() { try { manager.stop(); manager.undeploy(); Servlets.defaultContainer().removeDeployment(servletBuilder); } catch (ServletException e) { e.printStackTrace(); }}}); } catch (ServletException e) {
private void undeploy(DeploymentManager deploymentManager) { final Deployment deployment = deploymentManager.getDeployment(); CamelLogger.LOGGER.debug("Undeploying endpoint {}", deployment.getDeploymentInfo().getDeploymentName()); final ClassLoader old = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(deployment.getDeploymentInfo().getClassLoader()); try { try { hostSupplier.getValue().unregisterDeployment(deployment); deploymentManager.stop(); } catch (ServletException e) { throw new RuntimeException(e); } deploymentManager.undeploy(); servletContainerServiceSupplier.getValue().getServletContainer().removeDeployment(deployment.getDeploymentInfo()); } finally { Thread.currentThread().setContextClassLoader(old); } }
private void undeploy(DeploymentManager deploymentManager) { final Deployment deployment = deploymentManager.getDeployment(); CamelLogger.LOGGER.debug("Undeploying endpoint {}", deployment.getDeploymentInfo().getDeploymentName()); final ClassLoader old = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(deployment.getDeploymentInfo().getClassLoader()); try { try { hostSupplier.getValue().unregisterDeployment(deployment); deploymentManager.stop(); } catch (ServletException e) { throw new RuntimeException(e); } deploymentManager.undeploy(); servletContainerServiceSupplier.getValue().getServletContainer().removeDeployment(deployment.getDeploymentInfo()); } finally { Thread.currentThread().setContextClassLoader(old); } }
public void stopContext() { final ClassLoader old = Thread.currentThread().getContextClassLoader(); DeploymentInfo deploymentInfo = deploymentInfoInjectedValue.getValue(); Thread.currentThread().setContextClassLoader(deploymentInfo.getClassLoader()); try { if (deploymentManager != null) { Deployment deployment = deploymentManager.getDeployment(); try { host.getValue().unregisterDeployment(deployment); deploymentManager.stop(); } catch (ServletException e) { throw new RuntimeException(e); } deploymentManager.undeploy(); container.getValue().getServletContainer().removeDeployment(deploymentInfoInjectedValue.getValue()); } recursiveDelete(deploymentInfoInjectedValue.getValue().getTempDir()); } finally { Thread.currentThread().setContextClassLoader(old); } }
public void stopContext() { final ClassLoader old = Thread.currentThread().getContextClassLoader(); DeploymentInfo deploymentInfo = deploymentInfoInjectedValue.getValue(); Thread.currentThread().setContextClassLoader(deploymentInfo.getClassLoader()); try { if (deploymentManager != null) { Deployment deployment = deploymentManager.getDeployment(); try { host.getValue().unregisterDeployment(deployment); deploymentManager.stop(); } catch (ServletException e) { throw new RuntimeException(e); } deploymentManager.undeploy(); container.getValue().getServletContainer().removeDeployment(deploymentInfoInjectedValue.getValue()); } recursiveDelete(deploymentInfoInjectedValue.getValue().getTempDir()); } finally { Thread.currentThread().setContextClassLoader(old); } }
@Override public void destroy() throws Exception { manager.undeploy(); ServletContainer container = server.getValue().getServletContainer().getValue().getServletContainer(); container.removeDeployment(deploymentInfo); } }
@Override public void destroy() throws Exception { manager.undeploy(); ServletContainer container = server.getValue().getServletContainer().getValue().getServletContainer(); container.removeDeployment(deploymentInfo); } }