• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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: 23958
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 ]
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic