Set system properties in standalone-full.xml in wildfly 8.2

happy picture happy · Jun 9, 2015 · Viewed 22.6k times · Source

I have added system-properties tag in standalone-full.xml, but its not working in standalone mode. However, if I add the same tag in domain.xml it's working for domain mode.

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:2.2">

    <extensions>
    ....
    </extensions>

    <system-properties>
        <property name="java.util.Arrays.useLegacyMergeSort" value="true"/>
    </system-properties>
</server>

According to this article on jBoss General configuration concepts

System property values can be set in a number of places in domain.xml, host.xml and standalone.xml.

Then what about standalone-full.xml?

I don't want to set it through command line and not even in java code.

Answer

James R. Perkins picture James R. Perkins · Jun 9, 2015

In standalone it's probably too late to set it in the configuration files. You'll need to add it to the standalone.conf or standalone.conf.bat in the JAVA_OPTS environment variable. A global property like that needs to be set before anything else attempts to use java.util.Arrays.