uCosminexus Application Server, System Setup and Operation Guide
Sample program that uses the TP1 inbound linking functionality is stored in the following directory:
Cosminexus-installation-directory\CC\examples\tp1inbound
The overview and execution procedure of the sample program is as follows:
The following figure shows the configuration of the TP1 inbound linking functionality sample program:
Figure M-47 Configuration of TP1 inbound linking functionality sample program
This sample program receives RPC request messages from C language based SUP of Base sample provided by TP1/Server Base. It is a Message-driven Bean program for executing a process similar to C language based SPP of Base sample and returns the execution result to the C language based SUP as a RPC reply message. The Message-driven Bean process acquires the customer information, and updates in the same way as that of C language based SPP of Base sample.
The sample program stores the customer information in a table in the memory. The following Table M-5 describes the table configuration and Table M-6 describes the contents of the table used by the sample program:
Table M-5 Configuration of the table used by the sample program
| Column | Explanation |
|---|---|
| name | Name |
| sex | Sex |
| age | Age |
| sale | Sale |
Table M-6 Contents of the table used in sample program
| name | sex | age | sale |
|---|---|---|---|
| Suzuki | M | 30 | 1000000 |
| Okada | F | 23 | 1500000 |
| Yoshida | F | 26 | 800000 |
| Saitoh | M | 24 | 1000000 |
| Itoh | M | 35 | 1800000 |
| Nishikawa | M | 20 | 300000 |
| Katoh | F | 28 | 1000000 |
| Satoh | F | 27 | 2100000 |
| Hasegawa | M | 25 | 600000 |
| Watanabe | M | 31 | 1600000 |
The following procedure describes the procedure for executing the sample programs.
Perform the following settings for the Base sample of TP1/Server Base.
Set OpenTP1 user service definition and the user service network definition to call TP1 inbound adapter with the scheduler direct functionality by user service network definition. Set the following contents.
Table M-7 Settings in user service network definition
| Settings | Contents to be set |
|---|---|
| Service group name | Specify the service group name "base_svg" specified in the Base sample. |
| Host name | Specify the host name of Application Server.# |
| Port number | Specify the port number defined in the scd_port property of the Connector property file of TP1 inbound adapter. |
#: OpenTP1 compares the IP addresses of RPC sender and receiver, executes UNIX domain communication if the machine is the same, and INET domain communication if the machines are different. TP1 inbound adapter supports only INET domain communication. Hence, when you use OpenTP1 and TP1 inbound adapter on the same machine, you must specify the IP address different than the source assigned by IP alias functionality, in the host name.
You must set the performance analysis trace in the common system definitions; to inherit the information of OpenTP1 performance analysis trace by TP1 inbound adapter. The following table describes the settings:
Table M-8 Settings of the performance analysis trace
| Settings | Purpose of setting |
|---|---|
| set prf_trace=Y | To acquire the information of trace for the performance validation. |
| set rpc_prf_trace_level=00010001 | To transmit the OpenTP1 PRF information to Cosminexus. |
For common system definitions, see the manual OpenTP1 System Definition.
Compile the sample programs by using a batch file (compile.bat) provided in the sample. This batch file creates EAR file.
See Appendix M.1(1) Setting the J2EE server.
See Appendix M.1(2) Customizing the J2EE server.
See Appendix M.1(3) Starting the J2EE server.
For details on importing and setting the TP1 inbound adapter, see Appendix M.1(4) Setting the resource adapter. However, among the description in the reference, connection test of the resource adapter with the cjtestres command need not be executed. Message KDJE48606-E is generated on executing the connection test. In the settings of TP1 inbound adapter, specify the service group name "base_svg" specified in the Base sample, in the service_group property of the Connector property file.
See Appendix M.1(5) Importing, setting and starting the application.
See the Base sample provided by TP1/Server Base.
See Appendix M.1(6) Stopping and deleting the application.
This section describes the notes on using sample programs.
Ensure the proper settings for the connection of TP1 inbound adaptor to use as a resource in this sample program.
This sample program does not create or acquire the user data that recognizes Endian. Hence, run SUP on the platform having the identical Endian. If you run SUP on a platform having different Endian, the value of "Sales" in the sample program becomes invalid.
All Rights Reserved. Copyright (C) 2012, 2013, Hitachi, Ltd.