-
1. Re: Standard MBean (newbie)
adrian.brock Jun 25, 2003 12:38 PM (in response to cti_java)MBeanServer.registerMBean(...) in init()
Regards,
Adrian -
2. Re: Standard MBean (newbie)
shushu Jun 29, 2003 9:21 AM (in response to cti_java)in the jboss examples I see no code like MBeanServer.registerMBean(...).
If I'll write a standard mbean, where should I write the above code. -
3. Re: Standard MBean (newbie)
juhalindfors Jun 29, 2003 2:59 PM (in response to cti_java)> in the jboss examples I see no code like
> MBeanServer.registerMBean(...).
JBoss uses its own service format to create MBeans.
> If I'll write a standard mbean, where should I write
> the above code.
Where ever the resource you want to manage is ready and instantiated, for example in the servlet's init() method as Adrian suggested.
More info on the JMX API: http://vig.pearsoned.com/store/product/1,3498,store-6781_isbn-0672322889,00.html -
4. Re: Standard MBean (newbie)
shushu Jun 30, 2003 2:24 AM (in response to cti_java)First of all, thanks for your responses.
Second, I wrote a new mbean one class called MyClass that implements an mbean interface, MyMBean.
I entered the registerMBean... code to the constructor of the class with (this, objectname);
I added a jboss-service.xml, and wrapped it all into sar file.
Now I get "Class does not expose a management interface" what am I doing wrong???
Thanks. -
5. Re: Standard MBean (newbie)
juhalindfors Jun 30, 2003 4:10 AM (in response to cti_java)The naming convention for standard MBean interface is <class-name>MBean, so in the case of MyClass the interface name *must* be MyClassMBean.
-