• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to monitor dynamic values in JMX !!

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

*** 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
reply
    Bookmark Topic Watch Topic
  • New Topic