Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Managing/Administering Applications in Multiple JVMs

 
Prashant Sehgal
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement in my project where I need to manage, administor and monitor java applications that running in different JVMs. Basically visualise 5 executable JAR files - each of which prints "Hello World" in an infinite loop. I simulatneously run each of them from a new DOS window using java -jar HelloWorld.jar. So now I have 5 Hello World apps, each running it's own separate JVM.

Is there a way (through JMX?) that I can manage, administer and monitor these 5 apps from a single point? If yes, can someone point me to a good tutorial (with examples) where something like this is being talked about?

Thanks,
Prashant.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like a good application for JMX. The JEE FAQ has some links on JMX, particularly "introduction for Java 5", and some code in JmxExample.

Since all JVMs are running on the same machine, you'll need to figure out how to tell JMX (both the jconsole client and the various server instances) how to use different ports; otherwise they'll all try to use the default port, and nothing will work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic