uCosminexus Service Platform, Overview

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

2.5.2 Flow of messages when invoking service components

A request reception of an HCSC server operates by using an MDB (Message Driven Bean) and monitors the shared receive queue of the HCSC server side. When a message is sent to the shared receive queue of the HCSC server side, the message is extracted and then a service component is invoked.

The service requester of the TP1/EE side sends a message by directly accessing the database in which the shared receive queue exists.

For the shared send queue of the service requester side, specify the destination queue name in the Service Adapter Settings window in the development environment.

Use the commands of TP1/EE to create the database queue (shared receive queue) of the TP1/EE side to be used as the destination. Note that the database queue of the TP1/EE side must be created in the same database (the same HiRDB system) in which the shared send queue exists. The following figure shows the specification of the destination for an asynchronous (MDB (DB queue)) service component.

Figure 2-41 Specification of the destination for an asynchronous (MDB (DB queue)) service component

[Figure]

Note
Note that different queues are not created in the execution environment and HiRDB. Because the queues of a database are created in the same system, the queues in the execution environment and the queues of HiRDB are the same. The database queues of the TP1/EE side are also the same.

For details about creating a database queue, see the description about the data queue in the TP1/Server Base Enterprise Option Usage Guide.

Organization of this subsection
(1) When a service component is invoked from TP1/EE
(2) When a service component of TP1/EE is invoked

(1) When a service component is invoked from TP1/EE

When a service component is invoked from the service requester, the format of the message to be sent to the shared receive queue is BytesMessage.

The database queue header for an HCSC server is created in binary format by specifying parameters such as the service name to be invoked and client correlation ID. Then, the request message (binary format) is set up. This allows the contents of the request message (binary format) to be transmitted to the service component as the user message. When invoking standard reception (MDB (DB queue)) from the service requester, create in advance a request message matching the message format of the service component side, and then send that message set in the payload. The following figure shows the relationship between the user message and message format when a service component is invoked from TP1/EE.

Figure 2-42 Relationship between the user message and message format when a service component is invoked from TP1/EE

[Figure]

For details about how to create binary data, see 8.6.4 Creating binary data (TP1/EE and JMS) in the Service Platform Basic Development Guide.

(2) When a service component of TP1/EE is invoked

When a service component is invoked from the service adapter, the format of the message to be sent to the shared send queue is BytesMessage.

A request message matching the message format defined in the service adapter must be specified as a binary message. The following figure shows the relationship between the user message and message format when a service component of TP1/EE is invoked.

Figure 2-43 Relationship between the user message and message format when a service component of TP1/EE is invoked

[Figure]