이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat