private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = service.getContainer(); if (engine != null) { engine.addContainerListener(this); registerListenersForEngine(engine); } } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); registerListenersForEngine(engine); } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); registerListenersForEngine(engine); } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); registerListenersForEngine(engine); } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); registerListenersForEngine(engine); } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = service.getContainer(); if (engine != null) { engine.addContainerListener(this); registerListenersForEngine(engine); } } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); registerListenersForEngine(engine); } }
private void registerListenersForServer(Server server) { for (Service service : server.findServices()) { Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); registerListenersForEngine(engine); } }
/** * Create the MBeans for the specified Engine and its nested components. * * @param engine Engine for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Engine engine) throws Exception { // Create the MBean for the Engine itself if (log.isDebugEnabled()) { log.debug("Creating MBean for Engine " + engine); } //MBeanUtils.createMBean(engine); engine.addContainerListener(this); if (engine instanceof StandardEngine) { ((StandardEngine) engine).addPropertyChangeListener(this); } // Create the MBeans for the associated nested components Realm eRealm = engine.getRealm(); if (eRealm != null) { if (log.isDebugEnabled()) log.debug("Creating MBean for Realm " + eRealm); //MBeanUtils.createMBean(eRealm); } // Create the MBeans for each child Host Container hosts[] = engine.findChildren(); for (int j = 0; j < hosts.length; j++) { createMBeans((Host) hosts[j]); } }
void start() { ServletContainerFactory.registerContext(this); // Container[] childrenContainers = engine.findChildren(); for (Container childContainer : childrenContainers) { if (childContainer instanceof Host) { Host host = (Host)childContainer; registerHost(host); } } // engine.addContainerListener(this); }
@Test public void deployHost() { TomcatEventHandler handler = this.createEventHandler(this.eventHandler, this.provider, this.factory); org.apache.catalina.Engine engine = mock(org.apache.catalina.Engine.class); ContainerEvent event = new ContainerEvent(engine, Container.ADD_CHILD_EVENT, null); handler.containerEvent(event); verify(engine).addContainerListener(handler); }
/** * Create the MBeans for the specified Engine and its nested components. * * @param engine Engine for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Engine engine) throws Exception { // Create the MBean for the Engine itself if (log.isDebugEnabled()) { log.debug("Creating MBean for Engine " + engine); } //MBeanUtils.createMBean(engine); engine.addContainerListener(this); if (engine instanceof StandardEngine) { ((StandardEngine) engine).addPropertyChangeListener(this); } // Create the MBeans for the associated nested components Realm eRealm = engine.getRealm(); if (eRealm != null) { if (log.isDebugEnabled()) log.debug("Creating MBean for Realm " + eRealm); //MBeanUtils.createMBean(eRealm); } // Create the MBeans for each child Host Container hosts[] = engine.findChildren(); for (int j = 0; j < hosts.length; j++) { createMBeans((Host) hosts[j]); } }
/** * Create the MBeans for the specified Engine and its nested components. * * @param engine Engine for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Engine engine) throws Exception { // Create the MBean for the Engine itself if (log.isDebugEnabled()) { log.debug("Creating MBean for Engine " + engine); } //MBeanUtils.createMBean(engine); engine.addContainerListener(this); if (engine instanceof StandardEngine) { ((StandardEngine) engine).addPropertyChangeListener(this); } // Create the MBeans for the associated nested components Realm eRealm = engine.getRealm(); if (eRealm != null) { if (log.isDebugEnabled()) log.debug("Creating MBean for Realm " + eRealm); //MBeanUtils.createMBean(eRealm); } // Create the MBeans for each child Host Container hosts[] = engine.findChildren(); for (int j = 0; j < hosts.length; j++) { createMBeans((Host) hosts[j]); } }
/** * Create the MBeans for the specified Engine and its nested components. * * @param engine Engine for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Engine engine) throws Exception { // Create the MBean for the Engine itself if (log.isDebugEnabled()) { log.debug("Creating MBean for Engine " + engine); } //MBeanUtils.createMBean(engine); engine.addContainerListener(this); if (engine instanceof StandardEngine) { ((StandardEngine) engine).addPropertyChangeListener(this); } // Create the MBeans for the associated nested components Realm eRealm = engine.getRealm(); if (eRealm != null) { if (log.isDebugEnabled()) log.debug("Creating MBean for Realm " + eRealm); //MBeanUtils.createMBean(eRealm); } // Create the MBeans for each child Host Container hosts[] = engine.findChildren(); for (int j = 0; j < hosts.length; j++) { createMBeans((Host) hosts[j]); } }
Service service = (Service) source; Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); ((Lifecycle) engine).addLifecycleListener(this); if (engine.getDefaultHost() != null) {
Service service = (Service) source; Engine engine = (Engine) service.getContainer(); engine.addContainerListener(this); ((Lifecycle) engine).addLifecycleListener(this); if (engine.getDefaultHost() != null) {