[jboss-user] [Management, JMX/JBoss] - Re: Management interface to webapps
nappinc
do-not-reply at jboss.com
Mon Feb 19 09:54:06 EST 2007
Problem solved!
By ignoring the advice to use a .sar file, I've added code to my main application that programmatically registers the MBean. And if using Spring this code can be replaced by some very simple configuration instead.
| // get the JBoss JMX MBean Server
| MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
|
| // register custom MBean
| MonitoringMBean bean = new Monitoring();
| server.registerMBean(bean, new ObjectName("test:name=Monitoring"));
|
This is a much simpler solution, and needs no classloading configuration at all...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018856#4018856
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018856
More information about the jboss-user
mailing list