Source:
private static void resetEmbeddedServerProperties(final String jbossHomeDir, final EmbeddedServerType embeddedServerType) { assert jbossHomeDir != null; String jbossBaseDir; switch (embeddedServerType) { case STANDALONE: jbossBaseDir = jbossHomeDir + File.separator + "standalone"; break; case HOST_CONTROLLER: jbossBaseDir = jbossHomeDir + File.separator + "domain"; break; default: throw new RuntimeException("Unknown embedded server type: " + embeddedServerType); } WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_HOME_DIR, jbossHomeDir); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_BASE_DIR, jbossBaseDir); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_CONFIG_DIR, jbossBaseDir + File.separator + "configuration"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DEPLOY_DIR, jbossBaseDir + File.separator + "data" + File.separator +"content"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_TEMP_DIR, jbossBaseDir + File.separator + "data" + File.separator + "tmp"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_LOG_DIR, jbossBaseDir + File.separator + "log"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DATA_DIR, jbossBaseDir + File.separator + "data"); }

Target:
private static void resetEmbeddedServerProperties(final String jbossHomeDir, final EmbeddedServerType embeddedServerType) { assert jbossHomeDir != null; String jbossBaseDir; WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_HOME_DIR, jbossHomeDir); switch (embeddedServerType) { case STANDALONE: jbossBaseDir = jbossHomeDir + File.separator + "standalone"; WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_SERVER_CONFIG_DIR, jbossBaseDir + File.separator + "configuration"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_SERVER_DEPLOY_DIR, jbossBaseDir + File.separator + "data" + File.separator +"content"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_SERVER_TEMP_DIR, jbossBaseDir + File.separator + "data" + File.separator + "tmp"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_SERVER_LOG_DIR, jbossBaseDir + File.separator + "log"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_SERVER_DATA_DIR, jbossBaseDir + File.separator + "data"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_SERVER_BASE_DIR, jbossBaseDir); break; case HOST_CONTROLLER: jbossBaseDir = jbossHomeDir + File.separator + "domain"; WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DOMAIN_CONFIG_DIR, jbossBaseDir + File.separator + "configuration"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DOMAIN_DEPLOY_DIR, jbossBaseDir + File.separator + "data" + File.separator +"content"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DOMAIN_TEMP_DIR, jbossBaseDir + File.separator + "data" + File.separator + "tmp"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DOMAIN_LOG_DIR, jbossBaseDir + File.separator + "log"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DOMAIN_DATA_DIR, jbossBaseDir + File.separator + "data"); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_DOMAIN_BASE_DIR, jbossBaseDir); break; default: throw new RuntimeException("Unknown embedded server type: " + embeddedServerType); } }