MBeanServerConnection connection = connector.getMBeanServerConnection();
// Call the server side as if it is a local MBeanServer
ObjectName delegateName = ObjectName.getInstance("JMImplementation:type=MBeanServerDelegate");
Object proxy = MBeanServerInvocationHandler.newProxyInstance(connection, delegateName,
MBeanServerDelegateMBean.class, true);
MBeanServerDelegateMBean delegate = (MBeanServerDelegateMBean) proxy;
// The magic of JDK 1.3 dynamic proxy and JSR 160:
// delegate.getImplementationVendor() is actually a remote JMX call,
// but it looks like a local, old-style, java call.
log.info(delegate.getImplementationVendor() + " is cool !");
ObjectName objName = context.createObjectName(context);
proxy = MBeanServerInvocationHandler.newProxyInstance(connection, objName,