uCosminexus Application Server, System Setup and Operation Guide

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

Appendix M.9 Sample program of TP1 inbound linking functionality

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:

Organization of this subsection
(1) Overview of TP1 inbound linking functionality sample programs
(2) Execution procedure of the sample program of TP1 inbound linking functionality
(3) Notes on sample programs

(1) Overview of TP1 inbound linking functionality sample programs

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

[Figure]

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

(2) Execution procedure of the sample program of TP1 inbound linking functionality

The following procedure describes the procedure for executing the sample programs.

(a) Setting the base sample of TP1/Server Base

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.

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.

(b) Compiling the sample programs

Compile the sample programs by using a batch file (compile.bat) provided in the sample. This batch file creates EAR file.

(c) Setting the J2EE server

See Appendix M.1(1) Setting the J2EE server.

(d) Customizing the J2EE server

See Appendix M.1(2) Customizing the J2EE server.

(e) Starting the J2EE server

See Appendix M.1(3) Starting the J2EE server.

(f) Importing, setting and starting TP1 inbound adapter

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.

(g) Deploying the application

See Appendix M.1(5) Importing, setting and starting the application.

(h) Executing SUP

See the Base sample provided by TP1/Server Base.

(i) Undeploying the application

See Appendix M.1(6) Stopping and deleting the application.

(j) Stopping the J2EE server

See Appendix M.1(7) Stopping the J2EE server.

(3) Notes on sample programs

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.