aspose file tools*
The moose likes Other Java Products and Servers and the fly likes JMX use scenario Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "JMX use scenario" Watch "JMX use scenario" New topic
Author

JMX use scenario

Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
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
Sheriff

Joined: Sep 28, 2004
Posts: 18709
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMX use scenario