tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java
Date Thu, 07 Feb 2002 21:59:01 GMT
amyroh      02/02/07 13:59:00

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanUtils.java
  Log:
  Change to throw MBeanException so that ServerLifecycleListener can catch.
  
  Revision  Changes    Path
  1.21      +38 -21    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- MBeanUtils.java	7 Feb 2002 20:25:29 -0000	1.20
  +++ MBeanUtils.java	7 Feb 2002 21:59:00 -0000	1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
1.20 2002/02/07 20:25:29 amyroh Exp $
  - * $Revision: 1.20 $
  - * $Date: 2002/02/07 20:25:29 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
1.21 2002/02/07 21:59:00 amyroh Exp $
  + * $Revision: 1.21 $
  + * $Date: 2002/02/07 21:59:00 $
    *
    * ====================================================================
    *
  @@ -108,7 +108,7 @@
    *
    * @author Craig R. McClanahan
    * @author Amy Roh
  - * @version $Revision: 1.20 $ $Date: 2002/02/07 20:25:29 $
  + * @version $Revision: 1.21 $ $Date: 2002/02/07 21:59:00 $
    */
   
   public class MBeanUtils {
  @@ -199,7 +199,8 @@
           String mname = createManagedName(connector);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -226,7 +227,8 @@
           String mname = createManagedName(context);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -253,7 +255,8 @@
           String mname = createManagedName(context);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -280,7 +283,8 @@
           String mname = createManagedName(engine);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -307,7 +311,8 @@
           String mname = createManagedName(group);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -334,7 +339,8 @@
           String mname = createManagedName(host);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -361,7 +367,8 @@
           String mname = createManagedName(loader);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -387,7 +394,8 @@
           String mname = createManagedName(logger);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -414,7 +422,8 @@
           String mname = createManagedName(manager);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -441,7 +450,8 @@
           String mname = createManagedName(factory);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -468,7 +478,8 @@
           String mname = createManagedName(realm);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -495,7 +506,8 @@
           String mname = createManagedName(role);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -522,7 +534,8 @@
           String mname = createManagedName(server);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -549,7 +562,8 @@
           String mname = createManagedName(service);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -576,7 +590,8 @@
           String mname = createManagedName(user);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -603,7 +618,8 @@
           String mname = createManagedName(userDatabase);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  @@ -630,7 +646,8 @@
           String mname = createManagedName(valve);
           ManagedBean managed = registry.findManagedBean(mname);
           if (managed == null) {
  -            throw new Exception("ManagedBean is not found with "+mname);
  +            Exception e = new Exception("ManagedBean is not found with "+mname);
  +            throw new MBeanException(e);
           }
           String domain = managed.getDomain();
           if (domain == null)
  
  
  

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


Mime
View raw message