Boris Holzer - 2007-03-07

Logged In: YES
user_id=1063786
Originator: NO

I ran into the same prob.
It seems that the TimeMon is not threadsafe:
Having multiple Threads starting and stopping the same monitor instance, the TimeMon does not correlate the start() and the stop() invocations.
The above suggested solution might not really solve that prob !?

I suggest: The "active" counter should be something static:
Either the Monitor class or the MonitorFactory should count 'active' Monitors having the same key.
It should be impossible to start an 'active' Monitor - maybe start() should throw an IllegalStateException

BR
Boris