-
1. Re: Standalone application JMX example
dimitris Feb 4, 2005 5:43 PM (in response to aqan)AFAIK, the jboss management console needs to run in the same JVM with the MBeanServer that hosts the mbeans.
Otherwise it would have to be modified to use a remove JMX connector, but this would require some changes to the code.
One solution is to try and use the old "http adapter" that comes with Sun jmx1.0 tools library (if I remember correctly). This was a essentially a very primitive web server->JMX that can be started inside your application.
However, the preferred solution would be to start from the minimal jboss configuration and load your MBean inside jboss (since this is an MBean already, it's a piece of cake). Except for the console you'll get lots of freebies, like advanced classloading, hot-deployment, xml descriptors for loading your stuff, etc. etc. etc. -
2. Re: Standalone application JMX example
aqan Feb 7, 2005 12:34 PM (in response to aqan)Thanks for replying Dimitris.
I'd want to keep the application and management seperate.
Lets say I want to develop a custom management console (JSP) for the application. The JSP will bind to MBean instance and expose functionality to a web interface.
Is there anybody who has done it, or point me to an example.
Thanks -
3. Re: Standalone application JMX example
dimitris Feb 7, 2005 12:59 PM (in response to aqan)Independent of what you'll do with the MBeans remotely (display, get/set attrs, whatever), you'll need a connector to access them. A connector implementation usually differs from JMX implementation to another, unless the JSR160 spec is fully supported (it's only partially supported by jboss).
So it depends on the JMX implementation you'll be using in your server appllication.
I presume if you take the existing jmx-console as a starting point you may be able to change it to point to remote instances, over non-jboss connectors.
If you are not in a big hurry, a new JBossAdminConsole is in the works, and I believe most of what is discussed here will be standard functionality. -
4. Re: Standalone application JMX example
aqan Feb 9, 2005 1:49 PM (in response to aqan)Well I can use the JBoss JMX implementation on both ends, so there won't be any issue with the non-jsr-compliant implementation.