From: markt Date: Sun, 24 May 2009 17:54:19 +0000 (+0000) Subject: Remove unused methods, and with them a few more references to ServerFactory X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1c16670af95613f5768c01863aa2b09d989870f5;p=tomcat7.0 Remove unused methods, and with them a few more references to ServerFactory git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@778200 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java b/java/org/apache/catalina/mbeans/MBeanFactory.java index b6c4a8d57..9113279f0 100644 --- a/java/org/apache/catalina/mbeans/MBeanFactory.java +++ b/java/org/apache/catalina/mbeans/MBeanFactory.java @@ -644,48 +644,6 @@ public class MBeanFactory extends BaseModelMBean { } - /** - * Create a new StandardEngine. - * - * @param parent MBean Name of the associated parent component - * @param engineName Unique name of this Engine - * @param defaultHost Default hostname of this Engine - * @param serviceName Unique name of this Service - * - * @exception Exception if an MBean cannot be created or registered - */ - - public Vector createStandardEngineService(String parent, - String engineName, String defaultHost, String serviceName) - throws Exception { - - // Create a new StandardService instance - StandardService service = new StandardService(); - service.setName(serviceName); - // Create a new StandardEngine instance - StandardEngine engine = new StandardEngine(); - engine.setName(engineName); - engine.setDefaultHost(defaultHost); - // Need to set engine before adding it to server in order to set domain - service.setContainer(engine); - // Add the new instance to its parent component - Server server = ServerFactory.getServer(); - server.addService(service); - Vector onames = new Vector(); - // FIXME service & engine.getObjectName - //ObjectName oname = engine.getObjectName(); - ObjectName oname = - MBeanUtils.createObjectName(engineName, engine); - onames.add(0, oname); - //oname = service.getObjectName(); - oname = - MBeanUtils.createObjectName(engineName, service); - onames.add(1, oname); - return (onames); - - } - - /** * Create a new StandardHost. * @@ -768,32 +726,6 @@ public class MBeanFactory extends BaseModelMBean { /** - * Create a new StandardService. - * - * @param parent MBean Name of the associated parent component - * @param name Unique name of this StandardService - * - * @exception Exception if an MBean cannot be created or registered - */ - public String createStandardService(String parent, String name, String domain) - throws Exception { - - // Create a new StandardService instance - StandardService service = new StandardService(); - service.setName(name); - - // Add the new instance to its parent component - Server server = ServerFactory.getServer(); - server.addService(service); - - // Return the corresponding MBean name - return (service.getObjectName().toString()); - - } - - - - /** * Create a new UserDatabaseRealm. * * @param parent MBean Name of the associated parent component @@ -1024,27 +956,6 @@ public class MBeanFactory extends BaseModelMBean { /** - * Remove an existing Service. - * - * @param name MBean Name of the component to remove - * - * @exception Exception if a component cannot be removed - */ - public void removeService(String name) throws Exception { - - // Acquire a reference to the component to be removed - ObjectName oname = new ObjectName(name); - String serviceName = oname.getKeyProperty("serviceName"); - Server server = ServerFactory.getServer(); - Service service = server.findService(serviceName); - - // Remove this component from its parent component - server.removeService(service); - - } - - - /** * Remove an existing Valve. * * @param name MBean Name of the comonent to remove