3.16.5 Looking up Administered objects

You can obtain the Administered objects (AdminObject) using lookup. An Administered object is required to obtain the information of the message destination for sending messages from inside a J2EE application and for receiving the messages synchronously. To look up an Administered object, you must specify the resource adapter and J2EE application settings. This subsection gives an overview of the settings.

Reference note
The specifications of the Administered object depend on the resource adapter specifications. For details, follow the specifications of the resource adapter in use.
Organization of this subsection
(1) Setting up the Administered objects to be looked up
(2) J2EE application settings

(1) Setting up the Administered objects to be looked up

You set up the information for the Administered objects to be looked up, as the resource adapter properties. Specify the resource adapter properties with the HITACHI Connector Property file.

To set an Administered object as a lookup target, make sure you specify the name of the Administered object in the <adminobject-name> tag. When multiple Administered objects are defined for each resource adapter, the Administered object name is used to identify the Administered object uniquely.

For details on the settings, see 3.16.8 Settings for using the resource adapters conforming to the Connector 1.5 specifications.

(2) J2EE application settings

The J2EE application settings for looking up an Administered object can be specified in the property files or annotations.

(a) When using a property file

Specify the following elements beneath the <resource-env-ref> tag:

Specify the name to be used for lookup beneath the <resource-env-ref-name> tag. Specify the type of the Administered object that will be referenced beneath the <resource-env-ref-type> tag. Specify the Administered object name of the resource adapter and the resource adapter display name beneath the <linked-adminobject> tag.

Note
In EJB 2.1 and later, the <message-destination-ref> tag provided as the element for referencing the Administered objects is not available with Application Server.

For details on the settings, see 3.16.8 Settings for using the resource adapters conforming to the Connector 1.5 specifications.

(b) When using an annotation

Specify the name of the Administered object to be looked up in the mappedName attribute of @Resource. Specify the name in the following format. Use "!#" as the delimiter between the resource adapter display name and Administered object name.

@Resource(mappedName="resource-adapter-display-name!# Administered-object-name")