// see if the instance is running...
boolean running = true;
J2EEServer j2eeServer = AMXUtil.getJ2EEDomain().getJ2EEServerMap().get(name);
// try to stop the cluster.
if(j2eeServer.getstate() == StateManageable.STATE_RUNNING){
j2eeServer.stop();
}
// remove instance
AMXUtil.getDomainConfig().removeClusteredServerConfig(name);
}