aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to monitor dynamic values in JMX !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to monitor dynamic values in JMX !!" Watch "How to monitor dynamic values in JMX !!" New topic
Author

How to monitor dynamic values in JMX !!

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hello Ranchers,
I am trying to monitor number of user sessions through the JMX . I am using jconsole as UI. I have created a variable named 'numberOfUser" in my Monitor class(which is MBean implementation class) and I am updating this variable with each subsequent user login. I have printed the updated value on console and it worked fine. However I am not getting how should I monitor this changing value through jconsole. My requirement is I should be able to see the updated values of "numberOfUser" on jconsole with each user login. f Can anyone please let me know how can I achieve the same
Thanks
Samir
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18707
    
  40


*** clarification, I am not a JConsole user, so don't know if this will work for JConsole ***

The standard way for any JMX listener (like JConsole) to get attributes, in a asynchronous manner -- is through the use of JMX notifications. Just have your MBean send an attribute change notification to it's listeners.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to monitor dynamic values in JMX !!