//this is why the configuration is first deleted. Unfortunately, if
//this fails, we leave an unreferenced standalone configuration.
if (ClusterHelper.isClusterStandAlone(configContext, clusterName)) {
//Remove the cluster first
String configName = cluster.getConfigRef();
clusters.removeCluster(cluster, OVERWRITE);
//Remove the standalone configuration
getConfigsConfigBean().deleteConfiguration(configName);
} else {
clusters.removeCluster(cluster, OVERWRITE);
}