ObjectName on;
on = (ObjectName) mbs.getAttribute(moduleName, "Product");
check("ObjectName attribute value", on.equals(productName));
ProductMXBean productProxy = moduleProxy.getProduct();
MBeanServerInvocationHandler mbsih = (MBeanServerInvocationHandler)
Proxy.getInvocationHandler(productProxy);
check("ObjectName in proxy", mbsih.getObjectName().equals(productName));
mbs.setAttribute(moduleName, new Attribute("Product", product2Name));
ProductMXBean product2Proxy = module.getProduct();
mbsih = (MBeanServerInvocationHandler)
Proxy.getInvocationHandler(product2Proxy);
check("Proxy after setAttribute",
mbsih.getObjectName().equals(product2Name));
moduleProxy.setProduct(productProxy);
ProductMXBean productProxyAgain = module.getProduct();
mbsih = (MBeanServerInvocationHandler)
Proxy.getInvocationHandler(productProxyAgain);
check("Proxy after proxied set",
mbsih.getObjectName().equals(productName));
MBeanServer mbs2 = MBeanServerFactory.createMBeanServer();
ProductMXBean productProxy2 =
JMX.newMXBeanProxy(mbs2, productName, ProductMXBean.class);
try {