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

How to access Tomcat cluster info thru MBean

 
awdheshK Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat is running in clustered mode and for my project I need to retrieve information of all the running instances of cluster (nodes) thru MBean. Information like instance IP, instance name are my primary requirements.

Have tried to retrieve Cluster Mbean by querying "*:type=Cluster,*" , It have basic cluster info but it does not contain any instance info.

Will be very helpful if someone can suggest a way to retrieve instance Mbean.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Awdhesh!

You can't do that because the other nodes in the cluster are running in other JVMs and the MBean can only introspect the JVM that it's running on.
 
awdheshK Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't do that because the other nodes in the cluster are running in other JVMs and the MBean can only introspect the JVM that it's running on.

Thanks Tim. I per my understanding, every nodes in a cluster knows about its peer nodes and that information can be shared.
If that is not the case then I will have to develop my own solution based on multicasting.

Awdhesh

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic