• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMX use scenario

 
Justin Chu
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
  • 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 ]
 
Henry Wong
author
Marshal
Pie
Posts: 21437
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic