tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1240102 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Date Fri, 03 Feb 2012 12:06:28 GMT
Author: markt
Date: Fri Feb  3 12:06:28 2012
New Revision: 1240102

URL: http://svn.apache.org/viewvc?rev=1240102&view=rev
Log:
Remove unused code

Modified:
    tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240102&r1=1240101&r2=1240102&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb  3 12:06:28 2012
@@ -254,109 +254,6 @@ public class MBeanUtils {
 
     /**
      * Create, register, and return an MBean for this
-     * <code>Loader</code> object.
-     *
-     * @param loader The Loader to be managed
-     *
-     * @exception Exception if an MBean cannot be created or registered
-     *
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x
-     */
-    @Deprecated
-    static DynamicMBean createMBean(Loader loader)
-        throws Exception {
-
-        String mname = createManagedName(loader);
-        ManagedBean managed = registry.findManagedBean(mname);
-        if (managed == null) {
-            Exception e = new Exception("ManagedBean is not found with "+mname);
-            throw new MBeanException(e);
-        }
-        String domain = managed.getDomain();
-        if (domain == null)
-            domain = mserver.getDefaultDomain();
-        DynamicMBean mbean = managed.createMBean(loader);
-        ObjectName oname = createObjectName(domain, loader);
-        if( mserver.isRegistered( oname ))  {
-            // side effect: stop it
-            mserver.unregisterMBean( oname );
-        }
-        mserver.registerMBean(mbean, oname);
-        return (mbean);
-
-    }
-
-
-    /**
-     * Create, register, and return an MBean for this
-     * <code>MBeanFactory</code> object.
-     *
-     * @param factory The MBeanFactory to be managed
-     *
-     * @exception Exception if an MBean cannot be created or registered
-     *
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x
-     */
-    @Deprecated
-    static DynamicMBean createMBean(MBeanFactory factory)
-        throws Exception {
-
-        String mname = createManagedName(factory);
-        ManagedBean managed = registry.findManagedBean(mname);
-        if (managed == null) {
-            Exception e = new Exception("ManagedBean is not found with "+mname);
-            throw new MBeanException(e);
-        }
-        String domain = managed.getDomain();
-        if (domain == null)
-            domain = mserver.getDefaultDomain();
-        DynamicMBean mbean = managed.createMBean(factory);
-        ObjectName oname = createObjectName(domain, factory);
-        if( mserver.isRegistered(oname )) {
-            mserver.unregisterMBean(oname);
-        }
-        mserver.registerMBean(mbean, oname);
-        return (mbean);
-
-    }
-
-
-    /**
-     * Create, register, and return an MBean for this
-     * <code>NamingResources</code> object.
-     *
-     * @param resource The NamingResources to be managed
-     *
-     * @exception Exception if an MBean cannot be created or registered
-     *
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x
-     */
-    @Deprecated
-    static DynamicMBean createMBean(NamingResources resource)
-        throws Exception {
-
-        String mname = createManagedName(resource);
-        ManagedBean managed = registry.findManagedBean(mname);
-        if (managed == null) {
-            Exception e = new Exception("ManagedBean is not found with "+mname);
-            throw new MBeanException(e);
-        }
-        String domain = managed.getDomain();
-        if (domain == null)
-            domain = mserver.getDefaultDomain();
-        DynamicMBean mbean = managed.createMBean(resource);
-        ObjectName oname = createObjectName(domain, resource);
-        if( mserver.isRegistered( oname ))  {
-            mserver.unregisterMBean(oname);
-        }
-        mserver.registerMBean(mbean, oname);
-        return (mbean);
-
-    }
-
-
-    /**
-     * Create, register, and return an MBean for this
      * <code>Role</code> object.
      *
      * @param role The Role to be managed



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message