public ServiceMBeanDelegate(MBeanServer server, ServiceContainer container, String xmbean, ObjectName on)
{
this.container = container;
this.server = server;
serviceOn = on;
XMBean mbean = null;
try
{
Descriptor descriptor = new DescriptorSupport();
descriptor.setField(RESOURCE_REFERENCE, container.getSingleton());
descriptor.setField(RESOURCE_TYPE, xmbean);
descriptor.setField(SAX_PARSER, "org.apache.crimson.parser.XMLReaderImpl");
mbean = new XMBean(descriptor, DESCRIPTOR);
}
catch (NotCompliantMBeanException e)
{
throw new RuntimeException(e);
}
catch (javax.management.MBeanException e)
{
throw new RuntimeException(e);
}
mbeanInfo = mbean.getMetaData();
}