Configuring JCA administered objects
You can configure administered objects that comply with the Java™ EE Connector Architecture (JCA) specification.
About this task
Procedure
Example
Use the following example to learn how to configure resource adapters with two administered objects with unique interface class names.
In the following snippet from a ra.xml file, the MyAdapter resource adapter provides two administered objects with unique interface class names:
<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>
The following is an example of a server
configuration for this scenario:<adminObject jndiName="eis/connectionSpec">
<properties.MyAdapter.ConnectionSpec isolationLevel="4"/>
</adminObject>
<adminObject jndiName="eis/interactionSpec">
<properties.MyAdapter.InteractionSpec functionName="find"/>
</adminObject>
Use the following example to learn how to configure resource adapters with two administered objects with unique implementation class names.
In the following snippet from a ra.xml file, the MyAdapter resource adapter provides two administered objects with unique implementation class names:
<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>
The following is an example of a server
configuration for this scenario: <adminObject jndiName="eis/finder">
<properties.MyAdapter.FinderInteractionSpec resultSetType="1003"/>
</adminObject>
<adminObject jndiName="eis/updater">
<properties.MyAdapter.UpdaterInteractionSpec executionTimeout="3000"/>
</adminObject>
Use the following example to learn how to configure resource adapters with two administered objects where neither the simple interface nor implementation class names are unique.
In the following snippet from a ra.xml file, the MyAdapter resource adapter provides two administered objects where neither the simple interface nor the implementation class names are unique:
<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>
The following is an example of a server
configuration for this scenario:<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>
It is possible to override the suffixes of configuration element names. See the information about customizing JCA configuration elements to learn how to override the suffixes of configuration element names.