String agentPort,
String haAdminPassword,
String haAdminPasswordFile,
String clusterName) throws HADBSetupException
{
HADBRemoveClusterInfo info = null;
try
{
String pw = (haAdminPassword == null ? "null" : "******");
String s = "HADBConfigMBean.deleteHACluster() called with " +
"hosts=" + hosts +
", agentPort=" + agentPort +
", haAdminPassword=" + pw +
", haAdminPasswordFile=" + haAdminPasswordFile +
", clusterName=" + clusterName;
getLogger().log(Level.INFO, s);
info = new HADBRemoveClusterInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile, clusterName, getLogger(),
getConfigContext(), getMBeanServer());
info.setup();
HADBRemoveCluster rc = new HADBRemoveCluster(info);
return rc.remove();
}
catch(HADBSetupException hse)
{
throw hse;
}
catch(Exception e)
{
throw new HADBSetupException(e);
}
finally
{
if(info != null)
info.cleanup();
}
}