[jboss-user] [Management, JMX/JBoss] - Programatically creating XMBean Instance
toddjtidwell
do-not-reply at jboss.com
Thu May 3 23:40:43 EDT 2007
I've developed an XMBean that works fine when deployed through a jboss-service.xml. However, I've come to a point where I would like to deploy multiple instances of this XMBean programatically.
In the past, with a standard MBean, you'd do something like this:
| ArrayList serverList = MBeanServerFactory.findMBeanServer(null);
|
| MBeanServer server = (MBeanServer) serverList.get(0);
|
| ObjectName on=new ObjectName("my.domain:service=Test");
|
| ObjectInstance mbean = server.createMBean(MyMBean.class.getName(), on);
|
Sadly, with an XMBean the following Exception is thrown:
| javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object
|
Obviously this is because I haven't tied it to the XML descriptor. Is there a way to programatically do this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043063#4043063
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043063
More information about the jboss-user
mailing list