domainConfig.put(DomainConfig.K_TEMPLATE_NAME, template);
domainConfig.put(DomainConfig.K_PORTBASE, portBase);
domainConfig.put(DomainConfig.K_INITIAL_ADMIN_USER_GROUPS, Version.getInitialAdminGroups());
initSecureAdminSettings(domainConfig);
try {
DomainBuilder domainBuilder = new DomainBuilder(domainConfig);
domainBuilder.validateTemplate();
domainBuilder.run();
} catch (Exception e) {
throw new DomainException(e.getMessage());
}
}
else {