Hitachi

uCosminexus Application Server Expansion Guide


2.7.6 Procedure for setting a resource adapter

You use the server management commands to set up resource adapters. With a batch server, you deploy and use a resource adapter as a J2EE resource adapter.

The following figure shows the flow of new settings of a resource adapter, to be used on a batch server.

Figure 2‒12: Flow of new settings of a resource adapter, to be used on a batch server

[Figure]

The following subsections describe steps from 1 through 4 of the above figure:

  1. Import a resource adapter by using a server management command.

    You import a resource adapter by using the cjimportres command.

    For details on the resource adapters to be imported, see 2.7.3 Types of DB Connector (RAR file).

  2. Deploy a resource adapter by using a server management command.

    You deploy a resource adapter by using the cjdeployrar command.

    If you deploy a resource adapter, you can use the resource adapter as a J2EE resource adapter. J2EE resource adapter is a resource adapter that is deployed as a shared stand-alone module on a batch server. If you deploy the resource adapter imported by the server management command, you can use the resource adapter on the batch server.

  3. Define resource adapter properties by using server management commands.

    Acquire Connector property file with the cjgetrarprop command, edit the file and reflect edited contents with the cjsetrarprop command.

    In the case of a batch server, you specify an optional name to the resource adapter by using the user-specified namespace functionality. You define the settings of optional names performed with the user-specified namespace functionality in property of the resource adapters. For details on settings of the user-specified namespace functionality, see 2.6 Assigning optional name to Enterprise Bean or J2EE resource (user-specified namespace functionality) in the uCosminexus Application Server Common Container Functionality Guide.

    For details on the contents that you can specify in the property definition of resource adapters, see 2.7.7(2) Resource adapter settings.

  4. Test connection of the resource adapter by using a server management command.

    Execute the test connection of resource adapters by using the cjtestres command. For details on the validation contents of Connection Test performed for the resources, see 3.17 Testing connection to resources in the uCosminexus Application Server Common Container Functionality Guide.

For details on the operations with the server management commands, see 3. Basic Operations of Server Management Commands in the uCosminexus Application Server Application Setup Guide. For details on the cjimportres command, see cjimportres (importing resources) in the uCosminexus Application Server API Reference Guide. For details on the cjdeployrar command, see cjdeployrar (deploying resource adapters) in the uCosminexus Application Server API Reference Guide. For details on the cjgetrarprop command, see cjgetrarprop (acquiring properties of RAR file) in the uCosminexus Application Server API Reference Guide. For details on the cjtestres command, see cjtestres (testing connections of resources) in the uCosminexus Application Server API Reference Guide. For details on the properties, see 4. Property Files Used for Setting Resources in the uCosminexus Application Server Application and Resource Definition Reference Guide.

For details on the following procedures, see 3.3.8 Procedure for setting resource adapters (when deploying and using as J2EE resource adapter) in the uCosminexus Application Server Common Container Functionality Guide. In that case, read J2EE server as Batch server and J2EE application as batch application.