4.4.1 Adding a resource adapter
To add a resource adapter, you need the Connector attribute file. The following describes the procedure:
-
Execute the command as follows to display a list of resource adapters, and then make sure that a resource adapter named DB_Connector_for_HiRDB_Type4 is not found:
Navigation-Platform-installation-directory\PP\uCPSB\CC\admin\bin\cjlistrar uCNP_J2EE
-
Execute the command as follows to deploy the DB_Connector_for_HiRDB_Type4 resource adapter:
Navigation-Platform-installation-directory\PP\uCPSB\CC\admin\bin\cjdeployrar uCNP_J2EE -resname DB_Connector_for_HiRDB_Type4
-
Display a list of resource adapters again, and then make sure that the DB_Connector_for_HiRDB_Type4 resource adapter has been added.
-
Execute the command as follows to acquire the Connector attribute file for the resource adapter you added:
Navigation-Platform-installation-directory\PP\uCPSB\CC\admin\bin\cjgetrarprop uCNP_J2EE -resname DB_Connector_for_HiRDB_Type4 -c "C:\temp\TP_Connector_for_HiRDB_Type4.xml"
"C:\temp\TP_Connector_for_HiRDB_Type4.xml" is the file path to which the acquired Connector attribute file (extension is .xml) is stored. You can change this file path as needed.
Note that this step is not necessary if you have already created a Connector attribute file.
-
Edit the Connector attribute file to specify the database information to which you want to add the connection processing.
Specify values for the tags listed below according to the settings for the database:
Tag
Explanation
display-name
Resource adapter name
description
Database port number
DBHostName
Database's IP address or host name
encodeLang
Character set corresponding to the database's character codes
User
Name of the user connecting to the database
Password
Password of the user connecting to the database
Observe the following rules when editing the display-name tab:
-
Do not specify a character string beginning with ucnp (the specified value is not case sensitive).
-
Do not specify a value that is already used in another resource adapter.
Note that this step is not necessary if you have already created a Connector attribute file.
-
-
Execute the command as follows to apply the contents of the edited Connector attribute file to the resource adapter you added:
Navigation-Platform-installation-directory\PP\uCPSB\CC\admin\bin\cjsetrarprop uCNP_J2EE -resname resource-adapter-display-name -c "C:\temp\TP_Connector_for_HiRDB_Type4.xml"
The resource adapter display name is either DB_Connector_for_HiRDB_Type4 or the name specified for the display-name tag in the Connector attribute file.
-
Execute the command as follows to check whether the added resource adapter can connect to the database:
Navigation-Platform-installation-directory\PP\uCPSB\CC\admin\bin\cjtestres uCNP_J2EE -type rar -resname resource-adapter-display-name
-
Execute the command as follows to start the resource adapter:
Navigation-Platform-installation-directory\PP\uCPSB\CC\admin\bin\cjstartrar uCNP_J2EE -resname resource-adapter-display-name