This is what I eneded up using, however, since the MBeanServerDelegate version of the same method just required the listener object to be passed I wanted to it instead. No big deal.
that won't work since when you register your listener to an MBean, the server generates its own listener object that is the one actually passed to the MBean.
(that's how I remember the code anyway, might have changed)
Which is an interesting point in a way, we end up breaking the direct manipulation of the object because the client can't know the actual listener object.
At least when you're doing a combo of registering thru server and trying to unregister directly.
Registering directly and then unregistering directly on the object should work (of course you should not be able to get a direct ref to the delegate object in the first place, so I guess this whole point is moot).