In the JMX 1.4 Specification, PDF document, paragraph 9.3, we read:
"The derived gauge value (V[t]) for the counter difference is calculated at time t
using the following algorithm, where GP is the granularity period:
While t is less than StartDate+2GP, V[t] = (Integer)0"
The issue is that the derived Gauge value is null when is less than StartDate+2GP with JDK 6.
Because of that, a CounterNotification is potentially not emitted as it should.
This is a regression compared to JDK 5.
Attached output of a test run once over JDK 6 U5 b13 and once over JDK 5 U15 b08.
That test uses a threshold set to 2, a modulus set to 7, uses difference mode. We set the observed object to 0, 1, 2, 7. Granularity period is 500 ms and setAttribute calls are done every second.
The correct set of JCK tests hit by this defect is MonitorTest tests numbered 4, 5, 6, 13 and 20.
The tests numbered 1, 3, 32 and 33 do not use the difference mode then they've no chance to be hit by a wrong derived gauge computation.