> Message Translation
> JMS Header Fields
> EMS supports the ten predefined JMS header fields; see JMS Message Header Fields.
> Two Special Cases
> These two header fields are special cases:

> ● | JMS header JMSDestination corresponds to SmartSockets dest.

> ● | JMS header JMSReplyTo corresponds to SmartSockets reply_to.

> Import
> When importing a SmartSockets message to an EMS message, tibemsd does not set any JMS header fields, except for the special cases noted above.
> Export
> When exporting an EMS message to a SmartSockets message, tibemsd groups all the JMS header fields (except for the special cases noted above) into a single submessage within the SmartSockets message. The field JMSHeaders contains that submessage. Fields of the submessage map the names of JMS header fields to their values.
> tibemsd ignores any JMS header fields that are null or absent—it omits them from the exported message.
> You can instruct tibemsd to suppress the entire header submessage in all exported messages by setting the transport property export_headers = false.
> JMS Property Fields
> Import
> When importing a SmartSockets message to an EMS message, tibemsd sets these JMS properties:

> ● | JMS_TIBCO_IMPORTED gets the value true, indicating that the message did not originate from an EMS client.

> ● | JMS_TIBCO_MSG_EXT gets the value true, indicating that the message might contain submessage fields or array fields.

> ● | JMS_TIBCO_SS_SENDER gets the value of the SmartSockets sender header field (in SmartSockets syntax).

> In addition, tibemsd maps SmartSockets message properties to EMS properties; for details see SmartSockets Message Properties.
> Export
> When exporting an EMS message to a SmartSockets message, tibemsd groups all the JMS property fields into a single submessage within the SmartSockets message. The field JMSProperties contains that submessage. Fields of the submessage map the names of JMS property fields to their values.
> tibemsd ignores any JMS property fields that are not set, or are set to null—it omits them from the exported message.
> You can instruct tibemsd to suppress the entire properties submessage in the exported message by setting the transport property export_properties = false.
> SmartSockets Message Properties
> In release 4.1.0 (and later), tibemsd maps SmartSockets message headers to EMS message properties on import. Table 59 summarizes the mapping. The first column indicates the EMS property, and the second column indicates the SmartSockets method that gets the corresponding header.
> Import
> The transport parameter import_ss_headers governs the import behavior. The third column of Table 59 lists the values of that parameter for which tibemsd imports the message property in that row. See import_ss_headers on page 393.
> Export
> EMS client programs may modify the values of these properties within imported messages for re-export to SmartSockets. (However, exporting a native EMS message does not carry these properties to SmartSockets.)
> Export of these properties depends on the value of the transport parameter export_properties on page 395.
> When exporting an EMS message to SmartSockets, tibemsd maps these properties in reverse. In most cases, the mapping is symmetric—export maps them back to the same SmartSockets header. However, three exceptions (JMS_TIBCO_SS_SENDER, JMS_TIBCO_SS_MESSAGE_ID and JMS_TIBCO_SS_SEQ_NUM) are asymmetric—export maps them to subfields of the field JMSProperties within the SmartSockets message. The fourth column of Table 59 indicates this asymmetry.

> Table 59 SmartSockets Mapping Message Properties (Import & Export)
> EMS Property | SmartSockets Method | Import | Export Asymmetr.
> JMS_TIBCO_SS_SENDER | TipcMsgGetSender | none type_num all | Asymmetr.
> JMS_TIBCO_SS_TYPE_NUM | TipcMsgGetType | type_num all |
> JMS_TIBCO_SS_DELIVERY_MODE | TipcMsgGetDeliveryMode | all |
> JMS_TIBCO_SS_LB_MODE | TipcMsgGetLbMode | all |
> JMS_TIBCO_SS_EXPIRATION | TipcMsgGetExpiration | all |
> JMS_TIBCO_SS_PRIORITY | TipcMsgGetPriority | all |
> JMS_TIBCO_SS_SENDER_TIMESTAMP | TipcMsgGetSenderTimestamp | all |
> JMS_TIBCO_SS_CORRELATION_ID | TipcMsgGetCorrelationId | all |
> JMS_TIBCO_SS_USER_PROP | TipcMsgGetUserProp | all |
> JMS_TIBCO_SS_MESSAGE_ID | TipcMsgGetMessageId | all | Asymmetr.
> JMS_TIBCO_SS_SEQ_NUM | TipcMsgGetSeqNum | all | Asymmetr.

> Message Body
> tibemsd can export messages with any JMS message body type to TIBCO SmartSockets. Conversely, tibemsd can import messages with any message type from TIBCO SmartSockets.
> For information about JMS body types, see JMS Message Bodies.
> For information about the structure of messages, see JMS Message Structure.
> Import
> When importing a SmartSockets message, tibemsd translates it to one of two EMS message body types:

> ● | If the SmartSockets message contains only unnamed fields, then it translates into a JMSStreamMessage. The stream contains the values of the unnamed fields in the same order as they appear in the SmartSockets message.

> ● | If the SmartSockets message contains one or more named fields, then it translates into a JMSMapMessage. The map message contains the named fields; the order of the fields is indeterminate.

> Export
> When exporting an EMS message, tibemsd translates it to one of six SmartSockets message types (see Table 60) with the following structure:

> ● | The named field JMSHeaders is the first field (omitted when the transport parameter export_headers is false). It contains a submessage; see JMS Header Fields.

> ● | The named field JMSProperties is the next field (omitted when the transport parameter export_properties is false). It contains a submessage; see JMS Property Fields.

> ● | The data fields follow the JMS headers and properties (when present). For details about field names and types, see the third column of Table 60.

> Table 60 SmartSockets: Mapping Message Types (Export)
> JMS Message Type | SmartSockets Message Type | Data Fields
> JMSBytesMessage | T_MT_JMS_BYTES | One unnamed field of type T_MSG_FT_BINARY
> JMSMapMessage | T_MT_JMS_MAP | Named fields; indeterminate order
> JMSObjectMessage | T_MT_JMS_OBJECT | One unnamed field of type T_MSG_FT_BINARY
> JMSStreamMessage | T_MT_JMS_STREAM | Unnamed fields in order
> JMSTextMessage | T_MT_JMS_TEXT | One unnamed field of type T_MSG_FT_STR
> All other JMS message types | T_MT_INFO | No data fields

> Data Types
> Table 61 presents the mapping between EMS datatypes and SmartSockets datatypes. The mapping is bidirectional, except for a few SmartSockets types that have no corresponding EMS type (for these types the mapping is marked as unidirectional in the middle column of Table 61).

> Table 61 SmartSockets: Mapping Data Types
> EMS | Map | SmartSockets
> Boolean |  | T_MSG_FT_BOOL
> Byte |  | T_MSG_FT_CHAR
> Character |  | T_MSG_FT_INT2
> Short |  | T_MSG_FT_INT2
> Integer |  | T_MSG_FT_INT4
> Long |  | T_MSG_FT_INT8
> Float |  | T_MSG_FT_REAL4
> Double |  | T_MSG_FT_REAL8
> Double | <— | T_MSG_FT_TIMESTAMP
> String |  | T_MSG_FT_STR
> String | <— | T_MSG_FT_XML
> String | <— | T_MSG_FT_UTF8
> Byte Array |  | T_MSG_FT_BINARY
> Short Array | <— | T_MSG_FT_BOOL_ARRAY
> Short Array |  | T_MSG_FT_INT2_ARRAY
> Integer Array |  | T_MSG_FT_INT4_ARRAY
> Long Array |  | T_MSG_FT_INT8_ARRAY
> Float Array |  | T_MSG_FT_REAL4_ARRAY
> Double Array |  | T_MSG_FT_REAL8_ARRAY
> Double Array | <— | T_MSG_FT_TIMESTAMP_ARRAY
> Stream Message |  | T_MSG_FT_MSG (See Import.)
> Map Message |

> Destination Names
> tibemsd automatically translates destination names when importing or exporting a message; see Slash & Dot Separators.
> When importing, it translates names in the SmartSockets subject and reply_to fields. When exporting, it translates names in the EMS JMSDestination and JMSReplyTo fields.

Copyright © TIBCO Software Inc. All Rights Reserved.