• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMX use scenario

 
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a standalone daemon running in its own JVM, and there are j2ee servers running other business applications.

Is JMX a viable option for monitoring and managing this standalone daemon?

As I'm reading this:
http://java.sun.com/javase/6/docs/technotes/guides/jmx/tutorial/essential.html#wp1053098

I am thrown off when it involves creating a MBean server and wait indefinitely, I suppose this is something that should be implemented by JBoss? Any suggested intuitive tutorials about JMX?

What other remote technologies (lightweight) can be used to pull (push?) attributes from this standalone java process?
[ March 16, 2007: Message edited by: Chu Tan ]
 
author
Posts: 23956
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Weblogic, JBoss, Websphere, Tomcat, etc. all have built in JMX MBean servers, with a ridiculous number of mbeans that monitor and manage everything about them.

For standalone JVMs, beginning with Java 5, it starts an mbean server as part of the startup process. Prior to that, your standalone application will need to create and start an mbean server.


Another note: Just because you have an mbean server doesn't mean that it is connectable externally. Most of the app servers access their components via JNDI, and hence, should be fine. For Tomcat, or the standalone JVM, you should configure a mbean server connector mbean.


As for use scenario, JMX is merely a container with mbeans that monitor and manage the system. You may write your mbeans, and register it with the server. You may connect to specific mbeans to monitor it. You may register mbeans that monitor other mbeans. etc. What you do with it is up to you.

Henry
 
Justin Chu
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the code that I've used with MX4J implementation.

Do you know what's wrong with it? Currently the output hangs after "Registering HttpAdaptor" and never reaches the part which starts the Http server.



SOLVED: The server classpath's JMX 1.0 implementation is overriding mx4j's jmx 1.2 API, and strange thing happens.

[ March 19, 2007: Message edited by: Chu Tan ]
[ March 19, 2007: Message edited by: Chu Tan ]
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic