aspose file tools*
The moose likes Tomcat and the fly likes How to access Tomcat cluster info thru MBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to access Tomcat cluster info thru MBean" Watch "How to access Tomcat cluster info thru MBean" New topic
Author

How to access Tomcat cluster info thru MBean

awdheshK Kumar
Greenhorn

Joined: Aug 29, 2012
Posts: 2
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

Joined: Jun 25, 2001
Posts: 16142
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
awdheshK Kumar
Greenhorn

Joined: Aug 29, 2012
Posts: 2
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access Tomcat cluster info thru MBean