* such be aware that bugs fixed here should be fixed there as well.
*/
private void addResourceReferenceToCluster(Cluster cluster, boolean enabled,
String referenceName) throws ConfigException
{
ResourceRef ref = cluster.getResourceRefByRef(referenceName);
if (ref != null) {
//Resource ref already exists in cluster
throw new ConfigException(_strMgr.getString("clusterResourceRefAlreadyExists",
referenceName, cluster.getName()));
}
ref = new ResourceRef();
ref.setEnabled(enabled);
ref.setRef(referenceName);
cluster.addResourceRef(ref, OVERWRITE);
}