Set the value of a specific attribute of this MBean.
super.setAttribute(attribute);
ContextEnvironment ce = null;
try {
ce = (ContextEnvironment) getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
// cannot use side-efects. It's removed and added back each time
// there is a modification in a resource.
NamingResources nr = ce.getNamingResources();
nr.removeEnvironment(ce.getName());
nr.addEnvironment(ce);