I am wondering whether it is legal (as per spec) to register the same MBean under different ObjectNames. I thought it should but the conditions under which the registerMBean throws InstanceAlreadyExistsException are not very clear to me. What does it mean that it is already 'under control'?
Quote from the agent specification 1.0
InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
It is purely a ObjectName thing.
If your bean implements MBeanRegistration
or the jboss Service interface you won't get
the behaviour you expect unless you internally
count the number of times you are registered.