-
1. Re: using same MBeans across Application servers
adrian.brock Feb 26, 2002 9:52 AM (in response to sudheesh)You might want to do like Jetty.
They have one MBean that speaks JBoss,
i.e. it is a JBoss Service with all the lifecycle methods.
This MBean then registers/unregisters the others.
You will probably need one MBean for each appserver.
Alternatively, look at Dynamic/ModelMBeans. It should be
possible to expose different management interfaces
depending on the AppServer.
How you determine which server you are on is left as an
exercise to the reader. MBeanServer.getDefaultDomain()?
Regards,
Adrian -
2. Re: using same MBeans across Application servers
sgturner Feb 26, 2002 8:18 PM (in response to sudheesh)I had the same requirement, to write some MBeans that have no vendor specific code in them. The way I did this is to write an additional MBean that does have JBoss specific code. I added code in the jboss.jcml file to load only this additional MBean. The startService() then instantiates my non JBoss MBeans and registers them with the server. Everything seems to work OK.