The earlier code snippet i had sent had some of the naming conventions wrong. (i know it was silly). The code started to work properly but i have a new problem...
I changed the CPUgauge monitor to a counter monitor and made the CPUUsage Mbean return sone phony int values, the monitor notified me properly when the threshold was crossed. Next i changed it back to a gauge monitor and made the MBean return a double value(which was greater than the threshold HIgh) the GaugeMonitor is monitoring my bean( i checked it out by putting a println in getCPUUsage function) but not notifying me even when the JMX console shows me values greater the 2.0 (threshold)...why is it so??
just made both thresholdHigh and ThresholdLow to 0.0 and i startted getting notifications. Strangely enough the CPU usage was of the order of 0.0001 even though my JMX console is showing the cpu usage to be greater than 2.... any pointers??