User: stark
Date: 01/02/05 21:53:21
Modified: src/main/org/jboss/configuration ConfigurationService.java
Log:
Catch MBeanException in addition to RuntimeMBeanException in create()
to allow for better mbean failure reporting.
Revision Changes Path
1.16 +16 -0 jboss/src/main/org/jboss/configuration/ConfigurationService.java
Index: ConfigurationService.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/configuration/ConfigurationService.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ConfigurationService.java 2001/01/16 21:24:06 1.15
+++ ConfigurationService.java 2001/02/06 05:53:21 1.16
@@ -29,7 +29,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.15 $
+ * @version $Revision: 1.16 $
*/
public class ConfigurationService
extends ServiceMBeanSupport
@@ -231,6 +231,20 @@
public void loadConfiguration()
throws Exception
{
+java.net.URLClassLoader loader = (java.net.URLClassLoader)
Thread.currentThread().getContextClassLoader();
+System.out.println("loadConfiguration,
java.class.path="+System.getProperty("java.class.path"));
+while( loader != null )
+{
+System.out.println("loader:"+loader+", classpath:");
+java.net.URL[] urls = loader.getURLs();
+for(int u = 0; u < urls.length; u ++)
+ System.out.println("\t"+urls[u]);
+ClassLoader parent = loader.getParent();
+loader = null;
+if( parent instanceof java.net.URLClassLoader )
+ loader = (java.net.URLClassLoader) parent;
+}
+
// This is a 3-step process
// 1) Load user conf. and create MBeans from that
// 2) Load auto-saved conf and apply to created MBeans
@@ -338,6 +352,8 @@
log.error("Could not create MBean "+name+"("+code+")");
if (ex instanceof RuntimeMBeanException)
ex = ((RuntimeMBeanException)ex).getTargetException();
+ else if (ex instanceof MBeanException)
+ ex = ((MBeanException)ex).getTargetException();
else if (ex instanceof ReflectionException)
ex = ((ReflectionException)ex).getTargetException();
log.exception(ex);