int should work,
if it doesn't, can you send a reproducable test case to the bug tracker?
Sorry, I posted my question prematurely, so thanks all the more for giving me a push in the right direction. I verified that int does indeed work correctly as you say it should. The problem appears to be with type "long".
Here is a simple test:
After setting the PingPeriod attribute to something nonzero in the monitored mbean, the DerivedGauge attribute value remains at zero. Tried this with other long attributes from other mbeans, including AvailableConnectionsCount as mentioned previously, and got the same result: the DerivedGauge value is zero regardless of the monitored attribute value.
This topic exposed my previous lack of understanding of how a GaugeMonitor is designed to work.
More information and a solution is available in Sourceforge bugtracker under (rejected) bug #
[ 820164 ] monitoring long-typed attributes