Update of /cvsroot/mx4j/mx4j/src/core/javax/management
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3376/core/javax/management
Modified Files:
StandardMBean.java
Log Message:
Changed MBeanMetaData to be an interface instead of a class, allowing its pluggability
Index: StandardMBean.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/StandardMBean.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** StandardMBean.java 10 Feb 2003 16:00:02 -0000 1.2
--- StandardMBean.java 24 Feb 2004 15:13:40 -0000 1.3
***************
*** 136,140 ****
Class management = getMBeanInterface();
if (!management.isInstance(implementation)) throw new NotCompliantMBeanException("Implementation " + implementation + " does not implement interface " + management);
! metadata.mbean = implementation;
}
--- 136,140 ----
Class management = getMBeanInterface();
if (!management.isInstance(implementation)) throw new NotCompliantMBeanException("Implementation " + implementation + " does not implement interface " + management);
! metadata.setMBean(implementation);
}
***************
*** 146,150 ****
public Object getImplementation()
{
! return metadata.mbean;
}
--- 146,150 ----
public Object getImplementation()
{
! return metadata.getMBean();
}
***************
*** 157,161 ****
public final Class getMBeanInterface()
{
! return metadata.management;
}
--- 157,161 ----
public final Class getMBeanInterface()
{
! return metadata.getMBeanInterface();
}
***************
*** 167,171 ****
public Class getImplementationClass()
{
! return metadata.mbean.getClass();
}
--- 167,171 ----
public Class getImplementationClass()
{
! return metadata.getMBean().getClass();
}
***************
*** 207,211 ****
if (info == null)
{
! info = setupMBeanInfo(metadata.info);
cacheMBeanInfo(info);
}
--- 207,211 ----
if (info == null)
{
! info = setupMBeanInfo(metadata.getMBeanInfo());
cacheMBeanInfo(info);
}
***************
*** 462,470 ****
private MBeanMetaData introspectMBean(Object implementation, Class management)
{
! MBeanMetaData metadata = new MBeanMetaData();
! metadata.mbean = implementation;
! metadata.classloader = implementation.getClass().getClassLoader();
! metadata.standard = true;
! if (management != null) metadata.management = management;
MBeanIntrospector introspector = new MBeanIntrospector();
--- 462,470 ----
private MBeanMetaData introspectMBean(Object implementation, Class management)
{
! MBeanMetaData metadata = MBeanMetaData.Factory.create();
! metadata.setMBean(implementation);
! metadata.setClassLoader(implementation.getClass().getClassLoader());
! metadata.setMBeanStandard(true);
! metadata.setMBeanInterface(management);
MBeanIntrospector introspector = new MBeanIntrospector();
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.