* such be aware that bugs fixed here should be fixed there as well.
*/
private void addApplicationReferenceToCluster(Cluster cluster, boolean enabled,
String virtualServers, String referenceName) throws ConfigException
{
ApplicationRef ref = cluster.getApplicationRefByRef(referenceName);
if (ref != null) {
//Application ref already exists in cluster
throw new ConfigException(_strMgr.getString("clusterApplicationRefAlreadyExists",
referenceName, cluster.getName()));
}
ref = new ApplicationRef();
ref.setEnabled(enabled);
ref.setRef(referenceName);
ref.setVirtualServers(virtualServers);
cluster.addApplicationRef(ref, BaseConfigMBean.OVERWRITE);
}