Este contenido no está disponible en el idioma seleccionado.

13.5.9. JBoss Environment Variables


JBoss environment variables are available for supported JBoss applications.
Expand
Table 13.10. JBoss Environment Variables
Environment Variable Name Purpose
JAVA_OPTS Controlled by the cartridge and used to specify additional arguments to the JVM where JBoss application will run.
JAVA_OPTS_EXT Appended to the JAVA_OPTS environment variable before the JVM is invoked, and used to provide additional options to the JVM without rewriting the JAVA_OPTS environment variable. This allows developers to better support their application users.
DISABLE_OPENSHIFT_MANAGED_SERVER_CONFIG Set to true and the standalone.xml file from the repository is ignored, as is the copy that was retained.
JBoss environment variables are stored in the /App_Name/.openshift/config/standalone.xml file that is part of jbossas-7. The following example code shows the environment variables for a MySQL datasource connection URL in the form jdbc:mysql://SERVER_NAME:PORT/DATABASE_NAME:
<connection-url>jdbc:mysql://${env.OPENSHIFT_MYSQL_DB_HOST}:${env.OPENSHIFT_MYSQL_DB_PORT}/${env.OPENSHIFT_APP_NAME}</connection-url>
Copy to Clipboard Toggle word wrap
The environment variables can be saved on the server so that sensitive information is not repeatedly passed to the command line. The following instructions describe how to set environment variables on the server.

Procedure 13.4. To Set Environment Variables on the Server:

  1. Open the App_Name/.openshift/config/standalone.xml file.
  2. Specify the required values for any of your environment variables, then save and close the file.
  3. Commit and push the changes to the server:
    $ git commit -a -m "COMMIT MESSAGE"git commit -a -m "COMMIT MESSAGE"git commit -a -m "COMMIT MESSAGE"
    $ git push
    Copy to Clipboard Toggle word wrap

Important

Sensitive information stored in environment variables is visible if you use the rhc snapshot commands.

Note

If you use the jboss-cli.sh tool or the JBoss Management Console to edit the standalone.xml file, it only edits the local gear's standalone.xml file and not the repository one provided by your OpenShift cartridge template: App_Name/.openshift/config/standalone.xml. Manual changes will be lost upon an application restart, and the last version of the repository standalone.xml file will be used even if you remove the repository standalone.xml file.
To make your jboss-cli.sh tool or JBoss Management Console changes persistent or to stop the application from using the repository standalone.xml file, set the DISABLE_OPENSHIFT_MANAGED_SERVER_CONFIG environment variable to true by running:
# rhc env set DISABLE_OPENSHIFT_MANAGED_SERVER_CONFIG=true -a App_Name
Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat