On Wednesday 18 March 2015 06:18 PM, Fernando Nasser wrote:
On 2015-03-18 8:42 AM, Arun Gupta wrote:
> I'd like to not override the default JAVA_OPTS used by WildFly,
> instead add my own value to it. I think that's where MORE_JAVA_OPTS or
> EXTRA_JAVA_OPTS could be useful.
>
> Copy/pasting the existing JAVA_OPTS and including my own does not feel right :)
JAVA_OPTS="${JAVA_OPTS} <your new args>"
From what I see in WildFly 8.2.0.Final standalone.conf script, that
wouldn't work, since it has this
https://github.com/wildfly/wildfly/blob/8.x/build/src/main/resources/bin/...
:
#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m
-Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS
-Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS
-Djava.awt.headless=true"
else
echo "JAVA_OPTS already set in environment; overriding default
settings with values: $JAVA_OPTS"
fi
-Jaikiran
> Arun
>
> On Tue, Mar 17, 2015 at 10:22 PM, Jaikiran Pai <jai.forums2013(a)gmail.com>
wrote:
>> Hi Arun,
>>
>> The WildFly startup scripts allow you to *override* the JAVA_OPTS by setting
>> an environment variable of that same name. See the standalone.conf (for *nix
>> OS) file for details. From what I see, there's no option to append to the
>> default JAVA_OPTS, by setting an environment variable. This could be worked
>> around (in a bit brittle manner) by setting the overriding environment
>> variable value to contain the default JAVA_OPTS (copied over from
>> standalone.conf) plus the other custom/specific ones that the caller wants
>> to pass.
>>
>> -Jaikiran
>>
>> On Wednesday 18 March 2015 10:27 AM, Arun Gupta wrote:
>>> Can standalone.sh script be extended such that it takes an additional
>>> environment variable that is then added to JAVA_OPTS during startup?
>>>
>>> This can be used for passing additional Java options from WildFly
>>> Docker image. Cursory look at the script does not reveal anything like
>>> that exist.
>>>
>>> Arun
>>>
>>>
>
_______________________________________________
wildfly-dev mailing list
wildfly-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev