![[8.5.5.2 以降]](../ng_v8552.gif)

JCA 管理対象オブジェクトの構成
Java™ EE Connector Architecture (JCA) 仕様に準拠する管理対象オブジェクトを構成することができます。
このタスクについて
注: Liberty プロファイルの JCA サポートを構成するには、WebSphere® Application Server Developer Tools for Eclipse のサーバー構成エディターの「ソース」ビュー、または他のテキスト・エディターを使用して server.xml ファイルを編集する必要があります。このトピックでは、MyAdapter という固有 ID を持つリソース・アダプターが既にサーバーに構成されていると想定しています。詳細については、リソース・アダプターの構成に関する資料を参照してください。以下のステップでは、基本シナリオの構成のエンドツーエンド・サンプルを提供します。
注: WebSphere® Development Tools (WDT) の「設計」ビューで接続ファクトリー、管理オブジェクト、アクティベーション・スペック、およびリソース・アダプターのサーバー構成のプロパティー・サブエレメントを編集することはサポートされていません。
手順
例
固有のインターフェース・クラス名を持つ 2 つの管理対象オブジェクトを含むリソース・アダプターの構成方法については、以下の例を使用してください。
ra.xml ファイルからの以下のスニペットで、MyAdapter リソース・アダプターは、固有のインターフェース・クラス名を持つ 2 つの管理対象オブジェクトを提供します。
<adminobject>
<adminobject-interface>javax.resource.cci.ConnectionSpec</adminobject-interface>
<adminobject-class>com.vendor.adapter.ConnectionSpecImpl</adminobject-class>
<config-property>
<config-property-name>isolationLevel</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
...
</adminobject>
<adminobject>
<adminobject-interface>javax.resource.cci.InteractionSpec</adminobject-interface>
<adminobject-class>com.vendor.adapter.InteractionSpecImpl</adminobject-class>
<config-property>
<config-property-name>FunctionName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
...
</adminobject>
以下に、このシナリオのサーバー構成の例を示します。<adminObject jndiName="eis/connectionSpec">
<properties.MyAdapter.ConnectionSpec isolationLevel="4"/>
</adminObject>
<adminObject jndiName="eis/interactionSpec">
<properties.MyAdapter.InteractionSpec functionName="find"/>
</adminObject>
固有の実装クラス名を持つ 2 つの管理対象オブジェクトを含むリソース・アダプターの構成方法については、以下の例を使用してください。
ra.xml ファイルからの以下のスニペットで、MyAdapter リソース・アダプターは、固有の実装クラス名を持つ 2 つの管理対象オブジェクトを提供します。
<adminobject>
<adminobject-interface>javax.resource.cci.InteractionSpec</adminobject-interface>
<adminobject-class>com.vendor.adapter.FinderInteractionSpec</adminobject-class>
<config-property>
<config-property-name>ResultSetType</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
...
</adminobject>
<adminobject>
<adminobject-interface>javax.resource.cci.InteractionSpec</adminobject-interface>
<adminobject-class>com.vendor.adapter.UpdaterInteractionSpec</adminobject-class>
<config-property>
<config-property-name>ExecutionTimeout</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
</config-property>
...
</adminobject>
以下に、このシナリオのサーバー構成の例を示します。<adminObject jndiName="eis/finder">
<properties.MyAdapter.FinderInteractionSpec resultSetType="1003"/>
</adminObject>
<adminObject jndiName="eis/updater">
<properties.MyAdapter.UpdaterInteractionSpec executionTimeout="3000"/>
</adminObject>
シンプル・インターフェース・クラス名または実装クラス名のいずれも固有でない 2 つの管理対象オブジェクトを持つリソース・アダプターの構成方法については、以下の例を使用してください。
ra.xml ファイルからの以下のスニペットで、MyAdapter リソース・アダプターは、シンプル・インターフェース・クラス名または実装クラス名のいずれも固有でない 2 つの管理対象オブジェクトを提供します。
<adminobject>
<adminobject-interface>javax.resource.cci.InteractionSpec</adminobject-interface>
<adminobject-class>com.vendor.adapter.finder.InteractionSpecImpl</adminobject-class>
<config-property>
<config-property-name>ResultSetType</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
</config-property>
...
</adminobject>
<adminobject>
<adminobject-interface>javax.resource.cci.InteractionSpec</adminobject-interface>
<adminobject-class>com.vendor.adapter.updater.InteractionSpecImpl</adminobject-class>
<config-property>
<config-property-name>ExecutionTimeout</config-property-name>
<config-property-type>java.lang.Long</config-property-type>
</config-property>
...
</adminobject>
以下に、このシナリオのサーバー構成の例を示します。<adminObject jndiName="eis/finder">
<properties.MyAdapter.javax.resource.cci.InteractionSpec-com.vendor.adapter.finder.InteractionSpecImpl resultSetType="1003"/>
</adminObject>
<adminObject jndiName="eis/updater">
<properties.MyAdapter.javax.resource.cci.InteractionSpec-com.vendor.adapter.updater.InteractionSpecImpl executionTimeout="3000"/>
</adminObject>
構成エレメント名のサフィックスはオーバーライドできます。構成エレメント名のサフィックスのオーバーライド方法については、JCA 構成エレメントのカスタマイズに関する情報を参照してください。