MBeanServerInvocationHandler is specified to forward the methods hashCode(), toString(), and equals(Object) to the proxied MBean. This is basically never what you want, and in particular means that you cannot reasonably use an MBean proxy as a key in a HashMap (for example to look up a cached MBeanInfo for the proxy). MBeanServerInvocationHandler should only forward these methods if they are explicitly mentioned in the MBean interface for which it is a handler. This can be discovered by reflecting on the class of the proxy parameter to MBeanServerInvocationHandler.invoke. Its first superinterface will be the MBean interface, and it can be examined to see whether it contains the method in question.
###@###.### 10/12/04 11:07 GMT