This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic
 
friki data migration
Ranch Hand
Posts: 772
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a simple application that can be monitored using JMX. In addition to the parameters that the JVM makes available for monitoring, it creates two MBean objects of its own.

The application consists of 3 classes: the HelloMBean interface to declare what operations and properties the custom MBeans make available, the Hello class that implements the interface -this is the object that can be monitored-, and the HelloAgent application that ties it all together.





After starting the application with



run the JMX console via "jconsole" from the command line. In the MBeans tab you'll see the hello1 and hello2 objects. Their "message" property can be manipulated independently, and the change count is updated accordingly. The application will quit automatically after 5 minutes.

Instead of jconsole you can also use VisualVM (which ships with the JDK) if you install its MBeans plugin.




CategoryCodeSamples CodeBarn
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic