user3541119
user3541119

Reputation: 1

Openshift - Unable to set the env in JBoss as7 cartridges

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??

Upvotes: 0

Views: 127

Answers (2)

Jeff Zhang
Jeff Zhang

Reputation: 11

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

Upvotes: 1

Ohtar10
Ohtar10

Reputation: 128

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?

Upvotes: 0

Related Questions