Java Code Examples for org.apache.catalina.Engine#getName()
The following examples show how to use
org.apache.catalina.Engine#getName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MBeanUtils.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
/** * Deregister the MBean for this * <code>Engine</code> object. * * @param engine The Engine to be managed * * @exception Exception if an MBean cannot be deregistered * * @deprecated Unused. Will be removed in Tomcat 8.0.x */ @Deprecated static void destroyMBean(Engine engine) throws Exception { String domain = engine.getName(); if (domain == null) domain = mserver.getDefaultDomain(); ObjectName oname = createObjectName(domain, engine); if( mserver.isRegistered(oname) ) mserver.unregisterMBean(oname); }
Example 2
Source File: MBeanUtils.java From tomcatsrc with Apache License 2.0 | 5 votes |
/** * Deregister the MBean for this * <code>Engine</code> object. * * @param engine The Engine to be managed * * @exception Exception if an MBean cannot be deregistered * * @deprecated Unused. Will be removed in Tomcat 8.0.x */ @Deprecated static void destroyMBean(Engine engine) throws Exception { String domain = engine.getName(); if (domain == null) domain = mserver.getDefaultDomain(); ObjectName oname = createObjectName(domain, engine); if( mserver.isRegistered(oname) ) mserver.unregisterMBean(oname); }
Example 3
Source File: FarmWarDeployer.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public void start() throws Exception { if (started) return; Container hcontainer = getCluster().getContainer(); if(!(hcontainer instanceof Host)) { log.error(sm.getString("farmWarDeployer.hostOnly")); return ; } host = (Host) hcontainer; // Check to correct engine and host setup Container econtainer = host.getParent(); if(!(econtainer instanceof Engine)) { log.error(sm.getString("farmWarDeployer.hostParentEngine", host.getName())); return ; } Engine engine = (Engine) econtainer; String hostname = null; hostname = host.getName(); try { oname = new ObjectName(engine.getName() + ":type=Deployer,host=" + hostname); } catch (Exception e) { log.error(sm.getString("farmWarDeployer.mbeanNameFail", engine.getName(), hostname),e); return; } if (watchEnabled) { watcher = new WarWatcher(this, getWatchDirFile()); if (log.isInfoEnabled()) { log.info(sm.getString( "farmWarDeployer.watchDir", getWatchDir())); } } configBase = host.getConfigBaseFile(); // Retrieve the MBean server mBeanServer = Registry.getRegistry(null, null).getMBeanServer(); started = true; count = 0; getCluster().addClusterListener(this); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.started")); }
Example 4
Source File: FarmWarDeployer.java From Tomcat7.0.67 with Apache License 2.0 | 4 votes |
@Override public void start() throws Exception { if (started) return; Container hcontainer = getCluster().getContainer(); if(!(hcontainer instanceof Host)) { log.error(sm.getString("farmWarDeployer.hostOnly")); return ; } host = (Host) hcontainer; // Check to correct engine and host setup Container econtainer = host.getParent(); if(!(econtainer instanceof Engine)) { log.error(sm.getString("farmWarDeployer.hostParentEngine", host.getName())); return ; } Engine engine = (Engine) econtainer; String hostname = null; hostname = host.getName(); try { oname = new ObjectName(engine.getName() + ":type=Deployer,host=" + hostname); } catch (Exception e) { log.error(sm.getString("farmWarDeployer.mbeanNameFail", engine.getName(), hostname),e); return; } if (watchEnabled) { watcher = new WarWatcher(this, getWatchDirFile()); if (log.isInfoEnabled()) { log.info(sm.getString( "farmWarDeployer.watchDir", getWatchDir())); } } if (host.getXmlBase()!=null) { configBase = getAbsolutePath(host.getXmlBase()); } else { StringBuilder xmlDir = new StringBuilder("conf"); xmlDir.append('/'); xmlDir.append(engine.getName()); xmlDir.append('/'); xmlDir.append(host.getName()); configBase = getAbsolutePath(xmlDir.toString()); } // Retrieve the MBean server mBeanServer = Registry.getRegistry(null, null).getMBeanServer(); started = true; count = 0; getCluster().addClusterListener(this); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.started")); }
Example 5
Source File: FarmWarDeployer.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public void start() throws Exception { if (started) return; Container hcontainer = getCluster().getContainer(); if(!(hcontainer instanceof Host)) { log.error(sm.getString("farmWarDeployer.hostOnly")); return ; } host = (Host) hcontainer; // Check to correct engine and host setup Container econtainer = host.getParent(); if(!(econtainer instanceof Engine)) { log.error(sm.getString("farmWarDeployer.hostParentEngine", host.getName())); return ; } Engine engine = (Engine) econtainer; String hostname = null; hostname = host.getName(); try { oname = new ObjectName(engine.getName() + ":type=Deployer,host=" + hostname); } catch (Exception e) { log.error(sm.getString("farmWarDeployer.mbeanNameFail", engine.getName(), hostname),e); return; } if (watchEnabled) { watcher = new WarWatcher(this, getWatchDirFile()); if (log.isInfoEnabled()) { log.info(sm.getString( "farmWarDeployer.watchDir", getWatchDir())); } } if (host.getXmlBase()!=null) { configBase = getAbsolutePath(host.getXmlBase()); } else { StringBuilder xmlDir = new StringBuilder("conf"); xmlDir.append('/'); xmlDir.append(engine.getName()); xmlDir.append('/'); xmlDir.append(host.getName()); configBase = getAbsolutePath(xmlDir.toString()); } // Retrieve the MBean server mBeanServer = Registry.getRegistry(null, null).getMBeanServer(); started = true; count = 0; getCluster().addClusterListener(this); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.started")); }