static TomcatService forConfig(TomcatServiceConfig config) { final Consumer<Connector> postStopTask = connector -> { final org.apache.catalina.Server server = connector.getService().getServer(); if (server.getState() == LifecycleState.STOPPED) { try { logger.info("Destroying an embedded Tomcat: {}", toString(server)); server.destroy(); } catch (Exception e) { logger.warn("Failed to destroy an embedded Tomcat: {}", toString(server), e); } } }; return new ManagedTomcatService(null, new ManagedConnectorFactory(config), postStopTask); }
/** * Destroy the server. This object cannot be used once this method has been * called. */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. * * @throws LifecycleException Destroy error */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. * * @throws LifecycleException Destroy error */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
/** * Destroy the server. This object cannot be used once this method has been * called. */ public void destroy() throws LifecycleException { getServer(); server.destroy(); // Could null out objects here }
log.fatal(sm.getString("catalina.serverStartFail"), e); try { getServer().destroy(); } catch (LifecycleException e1) { log.debug("destroy() failed for failed Server ", e1);
log.fatal(sm.getString("catalina.serverStartFail"), e); try { getServer().destroy(); } catch (LifecycleException e1) { log.debug("destroy() failed for failed Server ", e1);
log.fatal(sm.getString("catalina.serverStartFail"), e); try { getServer().destroy(); } catch (LifecycleException e1) { log.debug("destroy() failed for failed Server ", e1);