/** * Process the addition of a new child Container to a parent Container. * * @param parent Parent container * @param child Child container */ protected void processContainerAddChild(Container parent, Container child) { if (log.isDebugEnabled()) log.debug("Process addChild[parent=" + parent + ",child=" + child + "]"); try { if (child instanceof Context) { createMBeans((Context) child); } else if (child instanceof Engine) { createMBeans((Engine) child); } else if (child instanceof Host) { createMBeans((Host) child); } } catch (MBeanException t) { Exception e = t.getTargetException(); if (e == null) e = t; log.error("processContainerAddChild: MBeanException", e); } catch (Throwable t) { log.error("processContainerAddChild: Throwable", t); } }
/** * Create the MBeans that correspond to every existing node of our tree. */ protected void createMBeans() { try { MBeanFactory factory = new MBeanFactory(); createMBeans(factory); createMBeans(ServerFactory.getServer()); } catch (MBeanException t) { Exception e = t.getTargetException(); if (e == null) e = t; log.error("createMBeans: MBeanException", e); } catch (Throwable t) { log.error("createMBeans: Throwable", t); } }
/** * Create the MBeans for the specified Service and its nested components. * * @param service Service for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Service service) throws Exception { // Create the MBean for the Service itself if (log.isDebugEnabled()) log.debug("Creating MBean for Service " + service); //MBeanUtils.createMBean(service); if (service instanceof StandardService) { ((StandardService) service).addPropertyChangeListener(this); } // Create the MBeans for the corresponding Connectors Connector connectors[] = service.findConnectors(); for (int j = 0; j < connectors.length; j++) { createMBeans(connectors[j]); } // Create the MBean for the associated Engine and friends Engine engine = (Engine) service.getContainer(); if (engine != null) { createMBeans(engine); } }
/** * Create the MBeans for the specified Service and its nested components. * * @param service Service for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Service service) throws Exception { if (service instanceof StandardService) { ((StandardService) service).addPropertyChangeListener(this); } // Create the MBeans for the corresponding Connectors Connector connectors[] = service.findConnectors(); for (int j = 0; j < connectors.length; j++) { createMBeans(connectors[j]); } // Create the MBean for the associated Engine and friends Engine engine = (Engine) service.getContainer(); if (engine != null) { createMBeans(engine); } }
/** * Create the MBeans for the specified Service and its nested components. * * @param service Service for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Service service) throws Exception { if (service instanceof StandardService) { ((StandardService) service).addPropertyChangeListener(this); } // Create the MBeans for the corresponding Connectors Connector connectors[] = service.findConnectors(); for (int j = 0; j < connectors.length; j++) { createMBeans(connectors[j]); } // Create the MBean for the associated Engine and friends Engine engine = (Engine) service.getContainer(); if (engine != null) { createMBeans(engine); } }
/** * Create the MBeans for the specified Service and its nested components. * * @param service Service for which to create MBeans * * @exception Exception if an exception is thrown during MBean creation */ protected void createMBeans(Service service) throws Exception { if (service instanceof StandardService) { ((StandardService) service).addPropertyChangeListener(this); } // Create the MBeans for the corresponding Connectors Connector connectors[] = service.findConnectors(); for (int j = 0; j < connectors.length; j++) { createMBeans(connectors[j]); } // Create the MBean for the associated Engine and friends Engine engine = (Engine) service.getContainer(); if (engine != null) { createMBeans(engine); } }
/** * Create the MBeans for the specified NamingResources and its * nested components. * * @param resources NamingResources for which to create MBeans */ protected void createMBeans(NamingResources resources) throws Exception { // Create the MBean for the NamingResources itself if (log.isDebugEnabled()) { log.debug("Creating MBean for NamingResources " + resources); } MBeanUtils.createMBean(resources); resources.addPropertyChangeListener(this); // Create the MBeans for each child environment entry ContextEnvironment environments[] = resources.findEnvironments(); for (int i = 0; i < environments.length; i++) { createMBeans(environments[i]); } // Create the MBeans for each child resource entry ContextResource cresources[] = resources.findResources(); for (int i = 0; i < cresources.length; i++) { createMBeans(cresources[i]); } // Create the MBeans for each child resource link entry ContextResourceLink cresourcelinks[] = resources.findResourceLinks(); for (int i = 0; i < cresourcelinks.length; i++) { createMBeans(cresourcelinks[i]); } }
/** * Process the addition of a new child Container to a parent Container. * * @param parent Parent container * @param child Child container */ protected void processContainerAddChild(Container parent, Container child) { if (log.isDebugEnabled()) log.debug("Process addChild[parent=" + parent + ",child=" + child + "]"); try { if (child instanceof Context) { createMBeans((Context) child); } else if (child instanceof Engine) { createMBeans((Engine) child); } else if (child instanceof Host) { createMBeans((Host) child); } } catch (MBeanException t) { Exception e = t.getTargetException(); if (e == null) e = t; log.error("processContainerAddChild: MBeanException", e); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error("processContainerAddChild: Throwable", t); } }
/** * Process the addition of a new child Container to a parent Container. * * @param parent Parent container * @param child Child container */ protected void processContainerAddChild(Container parent, Container child) { if (log.isDebugEnabled()) log.debug("Process addChild[parent=" + parent + ",child=" + child + "]"); try { if (child instanceof Context) { createMBeans((Context) child); } else if (child instanceof Engine) { createMBeans((Engine) child); } else if (child instanceof Host) { createMBeans((Host) child); } } catch (MBeanException t) { Exception e = t.getTargetException(); if (e == null) e = t; log.error("processContainerAddChild: MBeanException", e); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error("processContainerAddChild: Throwable", t); } }
/** * Process the addition of a new child Container to a parent Container. * * @param parent Parent container * @param child Child container */ protected void processContainerAddChild(Container parent, Container child) { if (log.isDebugEnabled()) log.debug("Process addChild[parent=" + parent + ",child=" + child + "]"); try { if (child instanceof Context) { createMBeans((Context) child); } else if (child instanceof Engine) { createMBeans((Engine) child); } else if (child instanceof Host) { createMBeans((Host) child); } } catch (MBeanException t) { Exception e = t.getTargetException(); if (e == null) e = t; log.error("processContainerAddChild: MBeanException", e); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error("processContainerAddChild: Throwable", t); } }
/** * 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 NamingResources and its * nested components. * * @param resources NamingResources for which to create MBeans */ protected void createMBeans(NamingResources resources) throws Exception { // Create the MBean for the NamingResources itself if (log.isDebugEnabled()) { log.debug("Creating MBean for NamingResources " + resources); } MBeanUtils.createMBean(resources); resources.addPropertyChangeListener(this); // Create the MBeans for each child environment entry ContextEnvironment environments[] = resources.findEnvironments(); for (int i = 0; i < environments.length; i++) { createMBeans(environments[i]); } // Create the MBeans for each child resource entry ContextResource cresources[] = resources.findResources(); for (int i = 0; i < cresources.length; i++) { createMBeans(cresources[i]); } // Create the MBeans for each child resource link entry ContextResourceLink cresourcelinks[] = resources.findResourceLinks(); for (int i = 0; i < cresourcelinks.length; i++) { createMBeans(cresourcelinks[i]); } }
/** * Create the MBeans for the specified NamingResources and its * nested components. * * @param resources NamingResources for which to create MBeans */ protected void createMBeans(NamingResources resources) throws Exception { // Create the MBean for the NamingResources itself if (log.isDebugEnabled()) { log.debug("Creating MBean for NamingResources " + resources); } MBeanUtils.createMBean(resources); resources.addPropertyChangeListener(this); // Create the MBeans for each child environment entry ContextEnvironment environments[] = resources.findEnvironments(); for (int i = 0; i < environments.length; i++) { createMBeans(environments[i]); } // Create the MBeans for each child resource entry ContextResource cresources[] = resources.findResources(); for (int i = 0; i < cresources.length; i++) { createMBeans(cresources[i]); } // Create the MBeans for each child resource link entry ContextResourceLink cresourcelinks[] = resources.findResourceLinks(); for (int i = 0; i < cresourcelinks.length; i++) { createMBeans(cresourcelinks[i]); } }
/** * Create the MBeans for the specified NamingResources and its * nested components. * * @param resources NamingResources for which to create MBeans */ protected void createMBeans(NamingResources resources) throws Exception { // Create the MBean for the NamingResources itself if (log.isDebugEnabled()) { log.debug("Creating MBean for NamingResources " + resources); } MBeanUtils.createMBean(resources); resources.addPropertyChangeListener(this); // Create the MBeans for each child environment entry ContextEnvironment environments[] = resources.findEnvironments(); for (int i = 0; i < environments.length; i++) { createMBeans(environments[i]); } // Create the MBeans for each child resource entry ContextResource cresources[] = resources.findResources(); for (int i = 0; i < cresources.length; i++) { createMBeans(cresources[i]); } // Create the MBeans for each child resource link entry ContextResourceLink cresourcelinks[] = resources.findResourceLinks(); for (int i = 0; i < cresourcelinks.length; i++) { createMBeans(cresourcelinks[i]); } }
createMBeans((Context) contexts[k]);
/** * 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]); } }
createMBeans((Context) contexts[k]);
createMBeans((Context) contexts[k]);