[jboss-cvs] JBossAS SVN: r78228 - trunk/mbeans/src/main/org/jboss/mx/server.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 9 03:51:22 EDT 2008


Author: dimitris at jboss.org
Date: 2008-09-09 03:51:22 -0400 (Tue, 09 Sep 2008)
New Revision: 78228

Modified:
   trunk/mbeans/src/main/org/jboss/mx/server/RawDynamicInvoker.java
Log:
JBAS-5933, include the cause of the exception when throwing NotCompliantMBeanException

Modified: trunk/mbeans/src/main/org/jboss/mx/server/RawDynamicInvoker.java
===================================================================
--- trunk/mbeans/src/main/org/jboss/mx/server/RawDynamicInvoker.java	2008-09-09 06:33:28 UTC (rev 78227)
+++ trunk/mbeans/src/main/org/jboss/mx/server/RawDynamicInvoker.java	2008-09-09 07:51:22 UTC (rev 78228)
@@ -1,24 +1,24 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.mx.server;
 
 import javax.management.Attribute;
@@ -206,7 +206,10 @@
       }
       catch (Exception e)
       {
-         throw new NotCompliantMBeanException("Cannot obtain MBeanInfo, for: " + oname);
+         // turn into a NotCompliantMBeanException
+         Exception ncmbe = new NotCompliantMBeanException("Cannot obtain MBeanInfo for: " + oname);
+         ncmbe.initCause(e);
+         throw ncmbe;
       }
 
       ClassLoader mbeanTCL = resourceEntry.getClassLoader();




More information about the jboss-cvs-commits mailing list