mx4j/src/core/mx4j/server MBeanMetaData.java,1.4,1.5
Simone Bordet <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/core/mx4j/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13701/src/core/mx4j/server Modified Files: MBeanMetaData.java Log Message: Fixing classloading of the MBeanMetaData implementation: first the current classloader then the context classloader Index: MBeanMetaData.java =================================================================== RCS file: /cvsroot/mx4j/mx4j/src/core/mx4j/server/MBeanMetaData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MBeanMetaData.java 24 Feb 2004 15:13:23 -0000 1.4 --- MBeanMetaData.java 16 Mar 2004 09:38:08 -0000 1.5 *************** *** 11,18 **** import java.security.AccessController; import java.security.PrivilegedAction; - - import javax.management.ObjectName; import javax.management.MBeanInfo; import javax.management.ObjectInstance; import mx4j.MX4JSystemKeys; --- 11,17 ---- import java.security.AccessController; import java.security.PrivilegedAction; import javax.management.MBeanInfo; import javax.management.ObjectInstance; + import javax.management.ObjectName; import mx4j.MX4JSystemKeys; *************** *** 20,26 **** /** * Objects of this class hold metadata information about MBeans. ! * @see Factory * @author <a href="mailto:[email protected]">Simone Bordet</a> * @version $Revision$ */ public interface MBeanMetaData --- 19,26 ---- /** * Objects of this class hold metadata information about MBeans. ! * * @author <a href="mailto:[email protected]">Simone Bordet</a> * @version $Revision$ + * @see Factory */ public interface MBeanMetaData *************** *** 28,31 **** --- 28,32 ---- /** * Sets the MBean instance + * * @see #getMBean */ *************** *** 34,37 **** --- 35,39 ---- /** * Returns the MBean instance + * * @see #setMBean */ *************** *** 40,43 **** --- 42,46 ---- /** * Sets the classloader for the MBean + * * @see #getClassLoader */ *************** *** 46,49 **** --- 49,53 ---- /** * Returns the classloader for the MBean + * * @see #setClassLoader */ *************** *** 52,55 **** --- 56,60 ---- /** * Sets the ObjectName of the MBean + * * @see #getObjectName */ *************** *** 58,61 **** --- 63,67 ---- /** * Returns the ObjectName of the MBean + * * @see #setObjectName */ *************** *** 64,67 **** --- 70,74 ---- /** * Sets the MBeanInfo of the MBean + * * @see #getMBeanInfo */ *************** *** 70,73 **** --- 77,81 ---- /** * Returns the MBeanInfo of the MBean + * * @see #setMBeanInfo */ *************** *** 76,79 **** --- 84,88 ---- /** * Sets the management interface of the standard MBean + * * @see #getMBeanInterface */ *************** *** 82,85 **** --- 91,95 ---- /** * Returns the management interface of the standard MBean + * * @see #setMBeanInterface */ *************** *** 88,91 **** --- 98,102 ---- /** * Sets whether the MBean is standard + * * @see #isMBeanStandard */ *************** *** 94,97 **** --- 105,109 ---- /** * Returns whether the MBean is standard + * * @see #setMBeanStandard */ *************** *** 100,103 **** --- 112,116 ---- /** * Sets whether the MBean is dynamic + * * @see #isMBeanDynamic */ *************** *** 106,109 **** --- 119,123 ---- /** * Returns whether the MBean is dynamic + * * @see #setMBeanDynamic */ *************** *** 112,115 **** --- 126,130 ---- /** * Sets the MBeanInvoker of the standard MBean + * * @see #getMBeanInvoker */ *************** *** 118,121 **** --- 133,137 ---- /** * Returns the MBeanInvoker of the standard MBean + * * @see #getMBeanInvoker */ *************** *** 124,127 **** --- 140,144 ---- /** * Returns the ObjectInstance of the MBean + * * @see #getMBeanInfo * @see #getObjectName *************** *** 146,152 **** }); if (className == null) className = "mx4j.server.MX4JMBeanMetaData"; try { ! return (MBeanMetaData)Thread.currentThread().getContextClassLoader().loadClass(className).newInstance(); } catch (Exception x) --- 163,178 ---- }); if (className == null) className = "mx4j.server.MX4JMBeanMetaData"; + try { ! try ! { ! return (MBeanMetaData)MBeanMetaData.class.getClassLoader().loadClass(className).newInstance(); ! } ! catch (ClassNotFoundException x) ! { ! // Not found with the current classloader, try the context classloader ! return (MBeanMetaData)Thread.currentThread().getContextClassLoader().loadClass(className).newInstance(); ! } } catch (Exception x) ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click