amyroh 02/02/07 15:59:50
Modified: catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java
Log:
Hold off on throwing MBeanException for now since not all Catalina component mbeans
are implemented yet
Revision Changes Path
1.22 +55 -38
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.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- MBeanUtils.java 7 Feb 2002 21:59:00 -0000 1.21
+++ MBeanUtils.java 7 Feb 2002 23:59:50 -0000 1.22
@@ -1,7 +1,7 @@
/*
- * $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 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
1.22 2002/02/07 23:59:50 amyroh Exp $
+ * $Revision: 1.22 $
+ * $Date: 2002/02/07 23:59:50 $
*
* ====================================================================
*
@@ -108,7 +108,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
- * @version $Revision: 1.21 $ $Date: 2002/02/07 21:59:00 $
+ * @version $Revision: 1.22 $ $Date: 2002/02/07 23:59:50 $
*/
public class MBeanUtils {
@@ -199,8 +199,9 @@
String mname = createManagedName(connector);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -227,8 +228,9 @@
String mname = createManagedName(context);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -255,8 +257,9 @@
String mname = createManagedName(context);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -283,8 +286,9 @@
String mname = createManagedName(engine);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -311,8 +315,9 @@
String mname = createManagedName(group);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -339,8 +344,9 @@
String mname = createManagedName(host);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -367,8 +373,9 @@
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);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -394,8 +401,9 @@
String mname = createManagedName(logger);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -422,8 +430,9 @@
String mname = createManagedName(manager);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -450,8 +459,9 @@
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);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -478,8 +488,9 @@
String mname = createManagedName(realm);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -506,8 +517,9 @@
String mname = createManagedName(role);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -534,8 +546,9 @@
String mname = createManagedName(server);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -562,8 +575,9 @@
String mname = createManagedName(service);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -590,8 +604,9 @@
String mname = createManagedName(user);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -618,8 +633,9 @@
String mname = createManagedName(userDatabase);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
@@ -646,8 +662,9 @@
String mname = createManagedName(valve);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
- Exception e = new Exception("ManagedBean is not found with "+mname);
- throw new MBeanException(e);
+ //Exception e = new Exception("ManagedBean is not found with "+mname);
+ //throw new MBeanException(e);
+ return null;
}
String domain = managed.getDomain();
if (domain == null)
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>