If i use the RMIAdaptor to register one GaugeMonitor to the JMX agent, and then register the same GaugeMonitor again, the existing one is not replaced, neither an exception is thrown. If there are Listeners registered with the old instance of GaugeMonitor, the notification will be send by the old GaugeMonitor also.
Seems like I have to un-register and register the monitor to prevent this from happening. Is this the expected behavior?