Translated message

A translation of this page exists in English.

EAP 6 設定ファイル standalone.xml/domain.xml/host.xml 内で OS 環境変数から値を取得する方法

Solution Unverified - Updated -

Issue

EAP 6 設定ファイル standalone.xml/domain.xml/host.xml で OS 環境変数を読み取って値を取得するにはどうしたら良いですか?

例えば、以下のようなネットワークインターフェースを指定する設定において、環境変数 HOSTNAME を読み取って利用したいと考えています。

<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
    </interface>
    <interface name="public">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    </interface>
    <interface name="unsecure">
        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
    </interface>
</interfaces>

以下のようにコマンドラインにて環境変数をシステムプロパティに渡すことができることは知っていますが、これをコマンドラインではなく設定ファイル内で完結したいと考えています。

./standalone.sh -b $HOSTNAME -bmanagement $HOSTNAME

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content