/** * Starts the children of this container. */ protected void startChildren() { Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { if (children[i] instanceof Lifecycle) { try { ((Lifecycle) children[i]).start(); } catch (Throwable t) { String msg = MessageFormat.format(rb.getString(LogFacade.CONTAINER_NOT_STARTED_EXCEPTION), children[i]); log.log(Level.SEVERE, msg, t); if (children[i] instanceof Context) { ((Context) children[i]).setAvailable(false); } else if (children[i] instanceof Wrapper) { ((Wrapper) children[i]).setAvailable(Long.MAX_VALUE); } } } } }
public void destroy() throws Exception { if( started ) { stop(); } initialized=false; // unregister this component if ( oname != null ) { try { if( controller == oname ) { Registry.getRegistry(null, null) .unregisterComponent(oname); if(log.isDebugEnabled()) log.debug("unregistering " + oname); } } catch( Throwable t ) { log.error("Error unregistering ", t ); } } if (parent != null) { parent.removeChild(this); } // Stop our child containers, if any Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { removeChild(children[i]); } }
Container children[] = findChildren(); for(Container aChildren : children) { removeChild(aChildren);
@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(); }
public void destroy() throws Exception { if( started ) { stop(); } initialized=false; // unregister this component if ( oname != null ) { try { if( controller == oname ) { Registry.getRegistry(null, null) .unregisterComponent(oname); if(log.isDebugEnabled()) log.debug("unregistering " + oname); } } catch( Throwable t ) { log.error("Error unregistering ", t ); } } if (parent != null) { parent.removeChild(this); } // Stop our child containers, if any Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { removeChild(children[i]); } }
@Override protected void destroyInternal() throws LifecycleException { Realm realm = getRealmInternal(); if (realm instanceof Lifecycle) { ((Lifecycle) realm).destroy(); } Cluster cluster = getClusterInternal(); if (cluster instanceof Lifecycle) { ((Lifecycle) cluster).destroy(); } // 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); } // If init fails, this may be null if (startStopExecutor != null) { startStopExecutor.shutdownNow(); } super.destroyInternal(); }
@Override protected void destroyInternal() throws LifecycleException { Realm realm = getRealmInternal(); if ((realm != null) && (realm instanceof Lifecycle)) { ((Lifecycle) realm).destroy(); } Cluster cluster = getClusterInternal(); if ((cluster != null) && (cluster instanceof Lifecycle)) { ((Lifecycle) cluster).destroy(); } // 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); } // If init fails, this may be null if (startStopExecutor != null) { startStopExecutor.shutdownNow(); } super.destroyInternal(); }
@Override protected void destroyInternal() throws LifecycleException { Realm realm = getRealmInternal(); if (realm instanceof Lifecycle) { ((Lifecycle) realm).destroy(); } Cluster cluster = getClusterInternal(); if (cluster instanceof Lifecycle) { ((Lifecycle) cluster).destroy(); } // 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); } // If init fails, this may be null if (startStopExecutor != null) { startStopExecutor.shutdownNow(); } super.destroyInternal(); }
public void destroy() throws Exception { if( started ) { stop(); } initialized=false; // unregister this component if (org.apache.tomcat.util.Constants.ENABLE_MODELER) { if ( oname != null ) { try { if( controller == oname ) { Registry.getRegistry(null, null).unregisterComponent(oname); } } catch( Throwable t ) { CatalinaLogger.CORE_LOGGER.failedContainerJmxUnregistration(oname, t); } } } if (parent != null) { parent.removeChild(this); } // Stop our child containers, if any Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { removeChild(children[i]); } }
Container children[] = findChildren(); List<Future<Void>> results = new ArrayList<>(); for (int i = 0; i < children.length; i++) {
for (Container child : findChildren()) { removeChild(child);
for (Container child : findChildren()) { removeChild(child);
Container children[] = findChildren(); List<Future<Void>> results = new ArrayList<>(); for (int i = 0; i < children.length; i++) {
Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { children[i].stop();
Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { children[i].stop();
Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { children[i].start();
Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { children[i].start();
Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { children[i].start();