Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.