Hitachi

uCosminexus Application Server System Setup and Operation Guide


L.8 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

The following figure shows the configuration of the TP1 inbound linking functionality sample program:

Figure L‒44: 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 L-4 describes the table configuration and Table L-5 describes the contents of the table used by the sample program:

Table L‒4: Configuration of the table used by the sample program

Column

Explanation

name

Name

sex

Sex

age

Age

sale

Sale

Table L‒5: 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.

  • Setting the scheduler direct by user service network definition

    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.

    • Specify TP1 inbound adapter service group name, host name and port number in the user service network definition. The following table describes the settings:

      Table L‒6: 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.

      Example of user service network definition

      dcsvgdef -g base_svg -h Host name[:Port number]

    • Set definition in the user service definition rpc_destination_mode. This enables you to search address from the specified value of user service network definition when you call the dc_rpc_call function.

      Example of user service definition

      set rpc_destination_mode = definition

      For details, see the OpenTP1 Program Creation Guide.

  • Setting the performance analysis trace

    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 L‒7: 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 L.1(1) Setting the J2EE server.

(d) Customizing the J2EE server

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

(e) Starting the J2EE server

See Appendix L.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 L.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.

(h) Executing SUP

See the Base sample provided by TP1/Server Base.

(i) Undeploying the application

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

(j) Stopping the J2EE server

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

(3) Notes on sample programs

This section describes the notes on using sample programs.