Hi,
I'll answer this myself:)
When the agent is starting a JBoss process it does NOT inherit the
environment variables of the agent if the "Start Script Environment
Variables" field in the Connection Settings options is not empty.
And usually there is at least JAVA_HOME.
I would assume the LANG variable would be set by the shell anyway, but
apparently RHEL non-login shell does not configure the locales.
So my solution was to include /etc/init.d/functions to the JBoss init
script. This is included by most RHEL init scripts and it does define the
LANG variable.
Cheers.
----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 12 Dec 2012 16:24:32 +0000
> From: Jaromir Hamala <jaromir.hamala(a)gmail.com>
> To: rhq-users(a)lists.fedorahosted.org
> Subject: RHQ operations vs. locales
> Message-ID:
> <
> CAMxXA6-_86e2Oo3CmG24EX_3a0gFCMKUugv-nKXK7L_Z2rVi-w(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I have a RHQ 4.4 with a bunch of JBoss EAP 5.1 servers defined.
>
> My OS (RHEL 5.6) has default locale set as en_GB.UTF-8, but when I start
> the JBoss via RHQ it ignores it and the environment does not contain LANG
> variable and therefore default charset of the JBoss JVM is not UTF-8.
>
> Is there a way how to force RHQ to respect default locale of the platform?
> I could not find any settings/option for this. I could change the JBoss
> start scripts and set the locale explicitly, but I would rather avoid this
> and use the locale of the platform.
>
> Thank you for any advice,
> Jaromir
>
>
--
“Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away.”
Antoine de Saint Exupéry