logger.info(msg);
}
return ( definitionCreated );
}
private void checkObjectNameUniquenessForSameTarget(final String target, final ObjectName on) throws Exception {
final Target t = TargetBuilder.INSTANCE.createTarget(target, vTargets, target, this.acc);
final TargetType pType = t.getType();
final String msg = CMBStrings.get("cmb.ee.objNameExists", on.toString(), target);
logger.info(msg);
if (TargetType.DOMAIN.equals(pType)) {
final List<Mbean> mds = ServerBeansFactory.getAllMBeanDefinitions(this.acc);
for (final Mbean md : mds) {
final String ons = md.getObjectName();
final ObjectName ton = new ObjectName(ons);
if (ton.equals(on)) {
throw new RuntimeException(msg); //TODO
}
}
}
/* 6320507 -- added check for TargetType.SERVER
* for some unknown reason a stand-alone server instance's type
* is SERVER, *not* STANDALONE_SERVER
*/
else if (TargetType.DAS.equals(pType) || TargetType.STANDALONE_SERVER.equals(pType)
|| TargetType.SERVER.equals(pType)) {
if (super.onExists(t.getName(), on)) {
throw new RuntimeException(msg);
}
}
else if (TargetType.CLUSTER.equals(pType)) {
final Server[] ss = ServerHelper.getServersInCluster(this.acc, target);