3.3.9 Procedure for resource adapter settings (To include and use the resource adapter in the J2EE application)
(1) Method of importing the J2EE application containing the resource adapter into the J2EE server
In this method, you create a J2EE application including the RAR file of the resource adapter, and then import that EAR file into the J2EE server. The following figure gives an overview of this method.
Figure 3-6 Overview of the method of importing the J2EE application containing the resource adapter into the J2EE server
![[Figure]](figure/zu030500.gif)
The following figure shows the procedure for importing a J2EE application containing a resource adapter into the J2EE server.
Figure 3-7 Procedure for importing a J2EE application containing a resource adapter into the J2EE server
![[Figure]](figure/zu030600.gif)
A description of points 1 to 4 in the figure is as follows:
- Use the server management commands to add the RAR file of the resource adapter into the EAR file of the J2EE application.
Use the cjaddapp command to add the RAR file of the resource adapter into the EAR file of the J2EE application.
The resource adapters included in the EAR file are limited. For details on the resource adapters included in the EAR file, see 3.3.3 How to use the resource adapters.
- Use the server management commands to import the J2EE application.
Use the cjimportapp command to import the J2EE application.
- Use the server management commands to define the resource adapter properties.
Use the cjgetappprop command to obtain the HITACHI Connector Property file, edit the file, and then use the cjsetappprop command to apply the edited content.
For details on the resource adapter properties specified for the functionality to be used, see the following locations:
- Use the server management commands to implement the resource adapter connection test.
Use the cjtestres command to implement the resource adapter connection test. For details on the content to be verified in the connection test for each resource, see 3.18 Connection test for resources.
(2) Method of adding the resource adapter in an imported J2EE application
In this method, you import the resource adapter (RAR file) into the J2EE server and then add the resource adapter in a J2EE application that is already imported into the same J2EE server. The following figure gives an overview of this method.
Figure 3-8 Overview of the method of adding the resource adapter in an imported J2EE application
![[Figure]](figure/zu030700.gif)
The following figure shows the procedure for adding the resource adapter into an imported J2EE application.
Figure 3-9 Procedure for adding the resource adapter into an imported J2EE application
![[Figure]](figure/zu030800.gif)
A description of points 1 to 5 in the figure is as follows:
- Use the server management commands to import the J2EE application.
Use the cjimportapp command to import the J2EE application.
- Use the server management commands to import the resource adapter.
Use the cjimportres command to import the resource adapter.
- Use the server management commands to add the resource adapter into the J2EE application.
Use the cjaddapp command to add the resource adapter into the J2EE application.
- Use the server management commands to define the resource adapter properties.
Use the cjgetappprop command to obtain the HITACHI Connector Property file, edit the file, and then use the cjsetappprop command to apply the edited content.
For details on the resource adapter properties specified for the functionality to be used, see the following locations:
- Use the server management commands to implement the resource adapter connection test.
Use the cjtestres command to implement the resource adapter connection test. For details on the content to be verified in the connection test for each resource, see
3.18 Connection test for resources.