if (n != null) {
String nodeHost = n.getNodeHost();
if (NetUtils.isThisHostLocal(nodeHost)) { // instance on same host as DAS
int dasAdminPort = domain.getServerNamed("server").getAdminPort();
// Don't use the getAdminPort duck type method directly on the instance being created
int instanceAdminPort = new ServerHelper(instance, config).getAdminPort();
if (instanceAdminPort != -1 && dasAdminPort != -1) {
if (instanceAdminPort == dasAdminPort) {
throw new TransactionFailure(localStrings.getLocalString(
"Server.cannotHaveSameAdminPortAsDAS",
"Cannot create an instance on the same host as DAS with the same admin port as DAS: {0}.", instanceAdminPort + ""));