ヘッダーをスキップ

<session-broker>要素

SessionBrokerは、クライアント・アプリケーションで1つのセッションから複数のデータベースを表示できるようにするメカニズムです。<session-broker>要素を使用すると、次のようにセッションXMLファイルでSessionBrokerを構成できます。

  1. セッションXMLファイルでSessionBrokerセッションを構成します。SessionBrokerはDatabaseSessionまたはServerSessionを使用してデータベースと通信します。
  2. <session-broker>要素を使用してSessionBrokerをセッションXMLファイルに追加します。
  3. <session-broker>要素に名前と、ステップ1で構成したセッションを移入します。

    例B-19 セッションXMLでのSessionBrokerの構成

    /* Configure the sessions for the SessionBroker */
    <session>
        <name>EmployeeSession</name>
        ...
    </session>
    <session>
        <name>ProjectSession</name>
        ...
    </session>
    /* Configure the SessionBroker */
    <session-broker>
    /* Name the SessionBroker */
        <name>EmployeeAndProjectBroker</name>
    /* Specify the sessions contained in the SessionBroker */
            <session-name>EmployeeSession</session-name>
            <session-name>ProjectSession</session-name>
    </session-broker>
        ...


関連項目

セッションXMLファイルのナビゲート
XMLヘッダー
<toplink-configuration>要素
<session>要素
JTA構成