-
1. Re: JMX-Console alternative on JBoss 7.x
dastraub Feb 13, 2012 1:26 PM (in response to thomasgo)Hi Thomas,
use this ;-)
It's a quickly hack from the old jmx-console, I changed only the part to resolve the mbean server.
-
jmx-console.zip 81.1 KB
-
twiddle.zip 81.1 KB
-
-
2. Re: JMX-Console alternative on JBoss 7.x
jamesbaxter Feb 13, 2012 5:04 PM (in response to thomasgo)1 of 1 people found this helpfulI quite like JMiniX: http://code.google.com/p/jminix/
-
3. Re: JMX-Console alternative on JBoss 7.x
dimitris Feb 13, 2012 6:16 PM (in response to jamesbaxter)1 of 1 people found this helpful -
4. Re: JMX-Console alternative on JBoss 7.x
thomasgo Feb 13, 2012 6:52 PM (in response to dimitris)Thanks for your suggestions, I'll try them and keep you posted on which console made it into our new setup.
-
5. Re: JMX-Console alternative on JBoss 7.x
thomasgo Feb 14, 2012 3:36 AM (in response to dimitris)Dimitris, the ported JMX-Console looks quite usable, although I miss some nice features like the JNDI View etc. (I think we could add them ourselves, though).
One more question (I'm just getting started with the changes that happened since JBoss 4.x ):
How would I create an MBean that is accessible through the ported JMX-Console?
Apparently, the @Service and @Management annotations are gone.
-
6. Re: JMX-Console alternative on JBoss 7.x
dlofthouse Feb 14, 2012 4:04 AM (in response to thomasgo)As an alternative to a web based app that will be exposed over the same port as any web applications you deploy yourself have you considered using jconsole instead?
https://community.jboss.org/wiki/UsingJconsoleToConnectToJMXOnAS7
This is accessible over the port used for the native management interface and is secured using the same mechanism as is used for the native interface.
-
7. Re: JMX-Console alternative on JBoss 7.x
thomasgo Feb 14, 2012 4:09 AM (in response to dlofthouse)Darran, that might be an option but I think we'll still need a web console since we sometimes need to do some management operations from systems that don't have a JConsole installed at that moment.
Thus we'd like to have a browser as the only requirement for that.
Additionally, you wrote
The first release to contain this will be JBoss AS 7.1.0.Final.
Can you give any information on when the final version will be published?
-
8. Re: JMX-Console alternative on JBoss 7.x
dimitris Feb 14, 2012 9:27 AM (in response to thomasgo)7.1 Final will be out any-time-now-really-soon
-
9. Re: JMX-Console alternative on JBoss 7.x
cvasilak Feb 15, 2012 4:14 AM (in response to thomasgo)Hi Thomas,
for the @Service @Management have a look at the following post from Adam. It desribes how to use the @Singleton @Startup as your MXBean. I use it internally in my project and I enjoy all "injection" benefits...
http://www.adam-bien.com/roller/abien/entry/singleton_the_simplest_possible_jmx
For the JNDI dump have a look here. It's not my code found it on the net, I adapted and mavenized it a bit
https://github.com/cvasilak/JNDIDumper
Hope that helps,
Regards
-
10. Re: JMX-Console alternative on JBoss 7.x
jaikiran Feb 15, 2012 4:18 AM (in response to cvasilak)The JNDI view is already available in the admin console that's shipped in AS7. Isn't that usable?
-
11. Re: JMX-Console alternative on JBoss 7.x
cvasilak Feb 15, 2012 4:27 AM (in response to jaikiran)This is nice! haven't seen till today!
The JNDI tree can be found under
Profile -> Container -> Naming
Thanks jaikiran!
Regards
-
12. Re: JMX-Console alternative on JBoss 7.x
dastraub Feb 15, 2012 6:52 AM (in response to cvasilak)Keep care with this solution. You have all this injection stuff beacause the ejb-container creates this singleton instance, call's @PostConstruct and so on ...
If you register this instance by the MBeanServer as MBean and call later this instance via the MBeanServer, the call is invoked in the context of the MBeanServer without transaction, security context and so on.
You will "land" in the ejb-container during the first call to an injected ejb.
By the "old" @Service-anntoated MBean, the MBean-call was also in the context of the ejb-container.
We run in some problems by porting an application (from JBoss 4.3) with this solution.
E.g. in a MBean method we call multiple ejb's. Now has each ejb-call his own transaction, in the "old" version we had only one transaction for all calls. It's a litte difference ;-)
-
13. Re: JMX-Console alternative on JBoss 7.x
thomasgo Feb 15, 2012 8:04 AM (in response to jaikiran)Well, I didn't see that.
It looks quite usable, but I'd have a couple of suggestions:
- It would be nice if I could display the entire JNDI tree in one go instead of having to manually expand all the nodes.
- The view isn't that readable if you have longer package names, due to the restricted width and the line wrapping.
- There is a vertical scroll bar but no horizontal one. Thus part of the information is hidden below the vertical scroll bar.
-
14. Re: JMX-Console alternative on JBoss 7.x
thomasgo Feb 15, 2012 8:16 AM (in response to cvasilak)Christos, using that approach might be simple but what I don't like about it is that I'd have to put the registration code into the @PostConstruct method in every MBean (we can't introduce a super class in the MBeans' hierarchy).
I found this project which uses a CDI extension for JBoss 6: http://code.google.com/p/jmx-annotations/
Here the MBeans would be singletons like in Adam's suggestion and are wrapped with a DynamicMBean instance to provide information.
The MBeans are then automatically registered in the post construct method of the injection target.
In JBoss 7, however, this doesn't work since for EJBs the injection target's postConstruct() method isn't called (see here for example: https://community.jboss.org/message/716573#716573).
Thus I adapted the usage of this project and it seems to work so far:
- MBeans are no EJBs anymore
- There is a singleton EJB that loops over all beans in the BeanManager, finds the mbeans, creates instances and registers them with the MBean server.
True, they don't run in a transactional context, but that's something we can live with.
@Daniel: how did you port your old-style MBeans to JBoss 7?