dcsimg
How can we register an Singleton class with JMX MBeanServer ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Johnny_Chao
Posted On:   Friday, November 8, 2002 09:06 AM

How can we register an Singleton class with JMX MBeanServer ?

My singleton Logger class doesnÂ’t have a public constructor. But JMX requires an MBean have a public constructor.

MBeanServer.registerMBean() throws

javax.management.NotCompliantMBeanException: The MBean does not have a public constructor

Thanks,
Johnny

Re: How can we register an Singleton class with JMX MBeanServer ?

Posted By:   Lasse_Koskela  
Posted On:   Saturday, November 9, 2002 07:17 AM

I think you've got two options:

1) add a public constructor to your singleton class

2) register a wrapper class, which contains a reference to your singleton class
About | Sitemap | Contact