cr.getNamingResources().removeResourceParams(cr.getName());
} else {
rp = new ResourceParams();
rp.setName(cr.getName());
String valueStr = ""+value;
rp.addParameter(name, valueStr);
}
cr.getNamingResources().addResourceParams(rp);
}
// cannot use side-efects. It's removed and added back each time