[JBoss-user] [JBossWS] - Re: creating an mbean to control your web service
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 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossWS] - Re: creating an mbean to control your web service
Thanks for the quick reply Thomas. I?ve got a web-service deployed and I would like to write an MBean with functionality that would allow me to see how many times my web service has been hit, change some strings in the web-service class etc. I have successfully deployed the example Hello World Service MBean but how would I write an MBean that was ?tied? to my web-service? Is that possible? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883057#3883057 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883057 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossWS] - Re: creating an mbean to control your web service
anonymous wrote : | read attributes etc in the web service from a jmx-console mbean | Please clarify. Do you want to expose an mbean as service endpoint? I supose not. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883052#3883052 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883052 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user