3.8.2 Message Queue adapter communication-configuration definition file
- Organization of this subsection
(1) Format
(2) Function
Specifies the communication definition of a Message Queue in XML format. The types of communication definitions are as follows:
-
Operation definition for sending messages
-
Operation definition for receiving messages
-
Operation definition for sending and receiving messages
-
Operation definition for receiving browsed messages
Use the following procedure to create a Message Queue adapter communication-configuration definition file, and then apply it to the runtime environment.
-
Copy the following template file to any directory, and then define the Message Queue adapter communication-configuration definition file:
service-platform-installation-directory\CSC\custom-adapter\MQ\config\templates\adpmq_communication.xml
Save the edited file with any file name.
-
Package the file in the HCSC development environment, and then import the package to the runtime environment.
The name of the Message Queue adapter communication-configuration definition file you created must be specified as the value of the <entry key="adpmq_deffile"> element in the Message Queue adapter environment-definition file. For details, see 3.8.1 Message Queue adapter environment-definition file.
If you have changed the definitions in the Message Queue adapter communication-configuration definition file, perform step2 to import the file to the runtime environment.
(3) Specifiable elements
<?xml version="1.0" encoding="UTF-8"?>
An XML declaration indicating that this file is an XML file.
<adaptermq_properties>
The root element of the Message Queue adapter communication-configuration definition.
<res_ref_name> ~ <alphanumeric characters and level separators> ((1-255 bytes))
Specifies the resource adapter specific information. For the value of this element, specify the same value as the <res-ref-name> element including jms/, contained in <hitachi-session-bean-property> in the HITACHI Application Integrated Property File. You cannot omit this specification.
For definition items that must match the values specified in the HITACHI Application Integrated Property File, see the description of how to specify the HITACHI Application Integrated Property File in the uCosminexus Application Server Application and Resource Definition Reference Guide.
<operation>
The operation element. You can specify this element as many times as the number of operations. You cannot omit this specification.
<op_name> ~ <alphanumeric characters> ((1-256 bytes))
This element specifies an operation name. For the value of this element, specify the operation name that is to be specified for the HCSC development environment. You cannot omit this specification.
<char_code> ~{UTF8|UTF16_BIG|UTF16_LITTLE|MS932|JIS|KEIS+EBCDIC|KEIS+EBCDIK}<<UTF8>>
Specifies a character code when transmission queue specific information and reception queue specific information are specified for a binary-format message that requests message transmission or reception. You can omit this specification.
<send_operation>
This element specifies message transmission. You can omit this specification.
You must specify this element when you specify a message transmission definition.
<receive_operation>
This element specifies message reception. You can omit this specification.
You must specify this element when you specify a message reception definition.
<sndrcv_operation>
This element specifies message transmission and reception. You can omit this specification.
You must specify this element when you specify a message transmission and reception definition.
<browse_operation>
This element specifies browsed message reception. You can omit this specification.
You must specify this element when you specify a browsed message reception definition.
<res_name> ~ <alphanumeric characters and level separators> ((1-255 bytes)) <<request message setting information>>
Specifies transmission queue specific information or reception queue specific information. For the value of this element, specify the same value as the <resource-env-ref-name> element contained in <hitachi-session-bean-property> in the HITACHI Application Integrated Property File.
You can omit this specification if you specify transmission queue specific information or reception queue specific information for request messages.
For definition items that must match the values specified in the HITACHI Application Integrated Property File, see the description of how to specify the HITACHI Application Integrated Property File in the uCosminexus Application Server Application and Resource Definition Reference Guide.
<res_inf>
When you execute a request for sending and receiving messages, specify the transmission queue specific information (<snd_res_name>) and reception queue specific information (<rcv_res_name>) elements. You can omit this specification.
When you specify this element, you must specify both transmission queue specific information and reception queue specific information. Specification of only one of them is not possible.
<snd_res_name> ~ <alphanumeric characters and level separators> ((1-255 bytes)) <<request message setting information>>
Specifies the transmission queue specific information. For the value of this element, specify the same value as the <resource-env-ref-name> element contained in <hitachi-session-bean-property> in the HITACHI Application Integrated Property File.
You can omit this specification if you specify transmission queue specific information for request messages.
For definition items that must match the values specified in the HITACHI Application Integrated Property File, see the description of how to specify the HITACHI Application Integrated Property File in the uCosminexus Application Server Application and Resource Definition Reference Guide.
<rcv_res_name> ~ <alphanumeric characters and level separators> ((1-255 bytes)) <<request message setting information>>
Specifies the reception queue specific information. For the value of this element, specify the same value as the <resource-env-ref-name> element contained in <hitachi-session-bean-property> in the HITACHI Application Integrated Property File.
You can omit this specification if you specify reception queue specific information for request messages.
For definition items that must match the values specified in the HITACHI Application Integrated Property File, see the description of how to specify the HITACHI Application Integrated Property File in the uCosminexus Application Server Application and Resource Definition Reference Guide.
<id_type> ~ {Type1 | Type2} <<Type1>>
Select either of the following options to specify whether to set a message correlation identifier. You can omit this specification.
-
Type1
A message correlation identifier is not set.
-
Type2
A message correlation identifier is set.
The operation for a message transmission request is different from the operation for a message reception or browsed message request, as shown below.
Value |
Message transmission request |
Message reception or browsed message reception request |
---|---|---|
Type1 |
The message is sent without a message correlation identifier set. |
The message is received without a message correlation identifier set. |
Type2 |
The message is sent with the message correlation identifier set for JMSCorrelationID. The message identifier is automatically created by the Message Queue adapter. |
The message is received with the user-defined message identifier (CorrelationID) set. |
<message_type> ~ {BytesMessage | TextMessage} <<BytesMessage>>
Specifies the transmission message type. You can omit this specification.
-
BytesMessage
The message is sent by using javax.jms.BytesMessage.
-
TextMessage
The message is sent by using javax.jms.TextMessage. However, an error occurs if the message transmission request (request message) is in binary format.
<JMSDeliveryMode> ~ {PERSISTENT|NONPERSISTENT} <<PERSISTENT>>
Specify whether sent messages are persistent. You can omit this specification.
-
PERSISTENT
Messages are persistent. After the queue manager restarts, the messages remain in the transmission queue.
-
NONPERSISTENT
Messages are not persistent. After the queue manager restarts, the messages do not remain in the transmission queue.
<JMSExpiration> ~ <numeric character> ((0-65535000)) <<0>>
Specify, in milliseconds, the retention time of messages to be sent. You can omit this specification.
If you omit this property or specify 0, messages will be retained in the transmission queue until they are obtained.
If you specify a value of less than 1 second, the value might be interpreted as 0 milliseconds. Check the JMS provider specifications.
<JMSType> ~ <alphanumeric characters>
Specifies a message type. For the value of this element, specify the message type that identifies a message to be sent or received. You can omit this specification.
This specification is invalid if you specify MQ for targetClient of the Queue property of the resource adapter.
<JMSCorrelID_PFX> ~ <alphanumeric characters> ((1-6 bytes))
Specifies the prefix of a message correlation identifier (CorrelationID). You can omit this specification.
For the value of this element, specify the prefix of a message correlation identifier. The value of this element takes effect if Type2 is selected for the <id_type> element of a message transmission or reception request.
<receive_timeout> ~ <numeric character> ((1000-65535000)) <<180000>>
Specify, in milliseconds, the message response monitoring time. You can omit this specification.
For the value of this element, specify the period of time until the reception of a message is completed. If a message cannot be received within the time specified for this element, fault response information returns.
(4) Example of coding
If you want to omit the value of an element, you must also omit the start and end tags of that element. If you specify only the start and end tags, you cannot omit the value or change the order of definitions between the tags.
Correct description
: <JMSExpiration>0</JMSExpiration> <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode> :
Incorrect description (No value is specified for <JMSDeliveryMode>)
: <JMSExpiration>0</JMSExpiration> <JMSDeliveryMode></JMSDeliveryMode> :