ObjectName on = new ObjectName("com.sun.appserv:type=cluster,name=" + targetName +
",category=config");
if (ServerHelper.isAServer(ctx, targetName)) {
on = new ObjectName("com.sun.appserv:type=server,name=" + targetName +
",category=config");
RuntimeStatus rtStatus = (RuntimeStatus) MBeanServerFactory.getMBeanServer().invoke(
on, "getRuntimeStatus", null, null);
if ((rtStatus != null) && (rtStatus.getStatus() != null)) {
status = rtStatus.getStatus().getStatusString();
}
} else {
RuntimeStatusList rtStatus = (RuntimeStatusList) MBeanServerFactory.getMBeanServer().invoke(
on, "getRuntimeStatus", null, null);
if (rtStatus != null) {
status = rtStatus.toString();
if (Status.getStatusString(Status.kClusterPartiallyRunningCode).equals(status)) {
status = Status.getStatusString(Status.kInstanceRunningCode);
}
}
}