uCosminexus Service Platform, Overview

[Contents][Glossary][Index][Back][Next]

2.6.2 Setting up a DB connector to be used by DB adapters

To access the database, you need to prepare a DB connector for accessing the machine on which the service components are running (machine on which the database is running), which is different from the DB connector defined when setting up the HCSC server.

Organization of this subsection
(1) Usable DB connectors
(2) Importing and deploying a DB connector
(3) Defining the properties of a DB connector

(1) Usable DB connectors

The usable DB connectors are limited depending on the transaction attribute of the DB connector defined when setting up the HCSC server.

The DB connectors that can be used by a DB adapter depend on the value of XATransaction or LocalTransaction specified in the dbcon-xadisplayname property of the HCSC server setup definition file. Therefore, you must consider the value of XATransaction or LocalTransaction specified in the dbcon-xadisplayname property when setting up the HCSC server.

Table 2-5 Usable DB connectors

DB connector being used DB adapter Usability Reason for non-usability
HCSC server side (dbcon-xadisplayname) Usable DB Connector DB adapter connection destination
LocalTransaction LocalTransaction Same database as that used by the HCSC server Yes --
LocalTransaction Different database from that used by the HCSC server No Because multiple DB Connectors cannot be mixed up in a local transaction
XATransaction Different database from that used by the HCSC server No Because XA transactions (global transactions) cannot be mixed up in a local transaction
XATransaction LocalTransaction Different database from that used by the HCSC server No Because multiple DB Connectors cannot be mixed up in an XA transaction
XATransaction Same database as that used by the HCSC server Yes --
XATransaction Different database from that used by the HCSC server Yes --

Legend:
--: Not applicable

(2) Importing and deploying a DB connector

Import and deploy the DB connector to be used by the DB adapter on the HCSC server (J2EE server).

For details about how to select the RAR file to be imported when using a DB adapter, see the contents about setting up a DB connector in the manual Cosminexus Service Platform System Setup and Operation Guide.

  1. Importing DB Connectors
    Import the DB connector using the following command:
     
    Cosminexus-installation-directory\CC\admin\bin\cjimportres J2EE-server-name -nameserver corbaname::localhost:port-number-for-in-process-naming-service-type rar -f Cosminexus-installation-directory\CC\DBConnector\RAR-file-to-be-imported
     
  2. Deploying DB Connectors
    Deploy the DB connector using the following command:
     
    Cosminexus-installation-directory\CC\admin\bin\cjdeployrar J2EE-server-name -nameserver corbaname::localhost:port-number-for-in-process-naming-service -resname imported-DB-Connector-name
     

(3) Defining the properties of a DB connector

After importing the DB connector, you define properties. For details about the property definition file, see the contents about the HITACHI Connector Property file in the manual Cosminexus Application Server Application and Resource Definitions.

Reference note
When setting up properties for the deployed DB connector, instead of creating a new XML for the property definition file, if you acquire the properties of the deployed DB connector and edit the acquired XML, you can efficiently create an XML.
  1. Acquire the file for property definition
    Acquire the file for defining properties of the DB connector using the following command:
     
    Cosminexus-installation-directory\CC\admin\bin\cjgetrarprop J2EE-server-name -nameserver corbaname::localhost:port-number-for-in-process-naming-service -resname imported-DB-Connector-name -c property.xml
     
  2. Edit the file for property definition
    Change the value of each attribute of the acquired XML file for property definition.
    For details about the settings of the XML file for property definition (HITACHI Connector Property file), see the contents about setting up a DB connector in the manual Cosminexus Service Platform System Setup and Operation Guide.
    For details about the HITACHI Connector Property file, see the description about defining properties of a DB connector in the manual Cosminexus Application Server Application Setup Guide, and also see the manual Cosminexus Application Server Application and Resource Definitions.
  3. Set up the edited file for property definition
    Set up the contents of the edited XML file for property definition in the deployed DB connector.
    Set up the definition contents in the DB connector using the following command:
     
    Cosminexus-installation-directory\CC\admin\bin\cjsetrarprop J2EE-server-name -nameserver corbaname::localhost:port-number-for-in-process-naming-service -resname imported-DB-Connector-name -c property.xml
     

    #: The XML file for property definition (property.xml) is the property definition file after the value of each attribute of the acquired property definition file has been changed.