From: philmcc <nu...@jb...> - 2005-06-30 14:24:58
|
I?ve worked out how to do it. Put this code in your service and deploy it. Create the MBean you want and deploy it. This code assumes the name attribute of the mbean element of the jboss-service.xml file is ?acme.com:service=HelloWorld? ArrayList ar = MBeanServerFactory.findMBeanServer(null); | MBeanServer mbs = (MBeanServer)ar.get(0); | ObjectName on = new ObjectName("acme.com:service=HelloWorld"); | MBeanInfo mbi = mbs.getMBeanInfo(on); | System.out.println(mbi.getClassName()); mbi is the MBeanInfo for you MBean - there you go, accessed from your service! All I have to do now is workout how to put a listener on the MBean so the service can see when it has been changed and change its behaviour. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883227#3883227 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883227 |