uCosminexus Service Platform, Basic Development Guide

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

8.6.9 Setting Up a Response Queue (TP1/EE or JMS)

The standard asynchronous reception (MDB (database queue)) is a standard reception for asynchronous request messages, and thus is used, as a rule, when there is no response from a service. However, when the asynchronous reception (MDB (database queue)) sends a request to a synchronous service component (Web Services or SessionBean), a response may be returned from the synchronous service component in some cases. In such a case, by specifying a response queue when making a request, the service requester can receive responses from a synchronous service component. For details about specifying a response queue when making a request, see 8.5.6 Sending JMS Messages.

Organization of this subsection
(1) In TP1/EE
(2) In JMS

(1) In TP1/EE

The asynchronous reception (MDB (database queue)) sends the JMS message, in which binary data including a response message is set in the payload, to the response queue (shared transmission queue).

The shared transmission queue extracts the binary data from the received response and sends it to the shared receive queue. You can extract the response sent to the shared receive queue and acquire the response message from the service component. For details about response extraction, see 8.6.10 Extracting Responses (TP1/EE or JMS).

The following figure shows the relationship among the standard asynchronous reception (MDB (database queue)), the shared transmission queue, and the shared receive queue.

Figure 8-29 Relationship among the standard asynchronous reception (MDB (database queue)), the shared transmission queue, and the shared receive queue (TP1/EE)

[Figure]

Shared transmission queue (response queue)
Create a shared transmission queue, which functions as a response queue, inside the J2EE server (Cosminexus RM) on which the HCSC server is running. For the registration destination queue of the shared transmission queue, specify the shared receive queue.
For details about how to create a shared transmission queue, see the section related to shared transmission queues in the manual Cosminexus Application Server Cosminexus Reliable Messaging.

Shared receive queue
Create a TP1/EE database queue inside the same schema definition of the database in which the shared transmission queue is located (which is being used by Cosminexus RM). For details, see the section related to shared receive queues in the manual Cosminexus Application Server Cosminexus Reliable Messaging.
Also, for details about how to create a database queue, see the contents about the database queue in the manual TP1/Server Base Enterprise Option Usage Guide.

(2) In JMS

As a response, the standard asynchronous reception (MDB (database queue)) sends the JMS message, in which binary data including a response message is set in the payload, to the response queue (shared transmission queue). The response received by the shared transmission queue is sent to the shared receive queue. By extracting the response sent to the shared receive queue, you can acquire the response from the service component. For details about response extraction, see 8.6.10 Extracting Responses (TP1/EE or JMS).

The following figure shows the relationship among the standard asynchronous reception (MDB (database queue)), the shared transmission queue, and the shared receive queue.

Figure 8-30 Relationship among the standard asynchronous reception (MDB (database queue)), the shared transmission queue, and the shared receive queue (JMS)

[Figure]

Shared transmission queue (response queue)
Create a shared transmission queue, which functions as a response queue, inside the J2EE server (Cosminexus RM) on which the HCSC server is running. For the registration destination queue of the shared transmission queue, specify the shared receive queue.
For details about how to create a shared transmission queue, see the section related to shared transmission queues in the manual Cosminexus Application Server Cosminexus Reliable Messaging.

Shared receive queue
Create a shared receive queue inside the J2EE server (Cosminexus RM) on which the service requester is running.
Specify a receive queue according to the user application as needed.
For details about how to create receive queues, see the section related to shared receive queues in the manual Cosminexus Application Server Cosminexus Reliable Messaging.