0

I want to set the -Djboss.server.default.config env variable in my JBoss AS 7 cartridge. I have tried using the action hook as follows

export _JAVA_OPTS=$_JAVA_OPTS"-Djboss.server.default.config=standalone-custom.xml"

and the file name is pre_start_jboss-as7.

This env is not set in JBoss. I tried restarting JBoss as well but still no luck.

I also tried from command prompt using rhc set-env command but still no luck.

Can anyone help me in setting this environment variable to my JBoss AS7 cartridge??

timo.rieber
  • 3,727
  • 3
  • 32
  • 47

2 Answers2

1

You can create a file in your gear path ~/jbosseap/env/ with name JAVA_OPTS_EXT and put the env variable -Djboss.server.default.config in to this file then when the jboss gear start, it will add this env after your JAVA_OPTS

Jeff Zhang
  • 11
  • 1
0

As far i know, when you have your local git copy of the repository of your application, in that directory structure, there is an standalone.xml which is the one that JBoss loads in your Openshift gear; have you tried to work with that file instead?

Ohtar10
  • 128
  • 1
  • 11