このコンテンツは選択した言語では利用できません。

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 では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat