JMX programmatically control memory usage

Hi,

I would like a server to programmatically receive updates concerning the memory usage of its clients. JMX seems to be able to do this. I have not found an example on how to do this programmatically.

Is there an easier way to do this other than using JMX? If not where can i start and learn how to do this? I have very little time and there is a sea of JMX tutorials,articles and code sample -unfortunately not relevant to what i need to do.

Can somebody at least guide me to some resources specific to my purpose?

Thanks

[555 byte] By [uiga] at [2007-11-27 3:37:56]
# 1

JDK includes the demo code to monitor the memory usage. It's in the <JDK5 or 6>/demo/management/MonitorMemory. The demo directory also has other code demonstrating the use of the java.lang.management API.

You don't need to use JMX nor establish a JMX server connection if you use the java.lang.management API in your server application. You can use the java.lang.management API just like the ordinary Java API.

Hope this helps.

mandy_kochunga at 2007-7-12 8:41:14 > top of Java-index,Core,Monitoring & Management...
# 2
Thanks a lot. This seems to be a start. I may sleep before 3.30 am after all :)
uiga at 2007-7-12 8:41:14 > top of Java-index,Core,Monitoring & Management...