JBoss EAP configured as Windows service doesnt seem to be loading the custom properties file.
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 6.x
Red Hat JBoss Enterprise Application Platform (EAP) 7.x
Issue
The windows host controller doesnt seem to be loading the custom properties file - I attempted to add the below to the domain.conf.bat file -
set JAVA_OPTS=%JAVA_OPTS% -Dproperties=E:\apps\JBossHC01\domain\configuration\host.properties But still the custom properties dont appear to get loaded. Is there a different line I should add, or possibly something that can be added directly to the java options for the JVM to load this host.properties file?
Resolution
EAP 6.4 and above
Edit domain.bat.conf or 'standalone.conf.bat' to add the SERVER_OPTS as below:
set "SERVER_OPTS=%SERVER_OPTS% --properties=c:\path\to\test.properties"
EAP 6.3 and below
If you are using service.bat to install the service, configure the STARTPARAM to add the properties file to domain.bat or standalone.bat:
if /I "%IS_DOMAIN%" == "true" (
set STARTPARAM="/c \"set NOPAUSE=Y ^^^&^^^& domain.bat --properties=c:\path\to\test.properties\""
set STOPPARAM="/c jboss-cli.bat --controller=%CONTROLLER% --connect %CREDENTIALS% --command=/host=!DC_HOST!:shutdown"
set LOGPATH=%JBOSS_HOME%\domain\log
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
