public void removeHost(Host host) { engine.removeChild(host); }
private void removeHost(ObjectRetriever objRetriever) { Host host = (Host)objRetriever.getInternalObject(); engine.removeChild(host); }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { engine.removeChild(host); } }
/** * Remove an existing Host. * * @param name MBean Name of the comonent to remove * * @exception Exception if a component cannot be removed */ public void removeHost(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String hostName = oname.getKeyProperty("host"); Service service = getService(oname); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(hostName); // Remove this component from its parent component if(host!=null) { if(host instanceof StandardHost) ((StandardHost)host).destroy(); else engine.removeChild(host); } }
engine.removeChild(host);
engine.removeChild(child); if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy(); } catch (Exception e) {
engine.removeChild(child); if ( child instanceof ContainerBase ) child.destroy(); } catch (Exception e) {
engine.removeChild(child); if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy(); } catch (Exception e) {
engine.removeChild(child); if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy(); } catch (Exception e) {
engine.removeChild(child); if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy(); } catch (Exception e) {
engine.removeChild(child); if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy(); } catch (Exception e) {
engine.removeChild(child); if ( child instanceof ContainerBase ) child.destroy(); } catch (Exception e) {
public static void removeVirtualHost(String hostName) { Engine engine = DataHolder.getInstance().getCarbonTomcatService().getTomcat().getEngine(); Host host = (Host) engine.findChild(hostName); Context context = (Context) host.findChild("/"); try { if (host.getState().isAvailable()) { if (context != null && context.getAvailable()) { context.setRealm(null); context.stop(); context.destroy(); log.info("Unloaded webapp from the host: " + host + " as the context of: " + context); } host.removeChild(context); host.setRealm(null); host.stop(); host.destroy(); engine.removeChild(host); } }catch (LifecycleException e) { log.error("error while removing host from tomcat", e); } URLMappingHolder.getInstance().removeUrlMappingMap( host.getName()); log.info("Unloaded host from the engine: " + host); } public static Host addHostToEngine(String hostName) {