Java Message Service (JMS) is a messaging standard defined by Sun Microsystems, Oracle, IBM, and other vendors. JMS is a set of interfaces and associated semantics that define how a JMS client accesses the facilities of an enterprise messaging product.
Oracle Java Message Service provides a Java API for Oracle Advanced Queuing (AQ) based on the JMS standard. Oracle JMS supports the standard JMS interfaces and has extensions to support the AQ administrative operations and other AQ features that are not a part of the standard. The abstract datatype used to store a JMS Text message in an AQ queue is called SYS.AQ$_JMS_TEXT_MESSAGE.
Oracle Workflow supports communication of JMS Text messages through the Business Event System by providing a queue handler called WF_EVENT_OJMSTEXT_QH. This queue handler translates between the standard Workflow WF_EVENT_T message structure and SYS.AQ$_JMS_TEXT_MESSAGE. Oracle Workflow also provides standard inbound and outbound queues that you can use for JMS Text messages, These queues are called WF_JMS_IN and WF_JMS_OUT, respectively, and use the WF_EVENT_OJMSTEXT_QH queue handler. See: Agents.
The SYS.AQ$_JMS_TEXT_MESSAGE datatype contains the following attributes.
HEADER - Header properties in the SYS.AQ$_JMS_HEADER datatype
TEXT_LEN - The size of the message payload, set automatically
TEXT_VC - The message payload in VARCHAR2 format, if the payload is equal to or less than 4000 bytes
TEXT_LOB - The message payload in CLOB format, if the payload is greater than 4000 bytes
The SYS.AQ$_JMS_HEADER datatype contains the following attributes.
REPLYTO - A Destination supplied by a client when a message is sent
TYPE - The type of the message
USERID - The identity of the user sending the message
APPID - The identity of the application sending the message
GROUPID - The identity of the message group of which this message is a part; set by the client
GROUPSEQ - The sequence number of the message within the group
PROPERTIES - Additional message properties in the SYS.AQ$_JMS_USERPROPARRAY datatype
The SYS.AQ$_JMS_USERPROPARRAY datatype is a named varying array with a maximum size of 100. The datatype of its elements is another ADT named SYS.AQ$_JMS_USERPROPERTY.
The following table shows how the attributes of the WF_EVENT_T message structure are mapped to the attributes within the SYS.AQ$_JMS_TEXT_MESSAGE structure.
Mapping WF_EVENT_T Attributes to SYS.AQ$_JMS_TEXT_MESSAGE Attributes
| WF_EVENT_T | SYS.AQ$_JMS_TEXT_MESSAGE |
|---|---|
| WF_EVENT_T.PRIORITY | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.SEND_DATE | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.RECEIVE_DATE | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.CORRELATION_ID | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.EVENT_NAME | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.EVENT_KEY | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.EVENT_DATA | TEXT_VC or TEXT_LOB |
| WF_EVENT_T.PARAMETER_LIST | SYS.AQ$_JMS_HEADER.REPLYTO |
| WF_EVENT_T.PARAMETER_LIST | SYS.AQ$_JMS_HEADER.TYPE |
| WF_EVENT_T.PARAMETER_LIST | SYS.AQ$_JMS_HEADER.USERID |
| WF_EVENT_T.PARAMETER_LIST | SYS.AQ$_JMS_HEADER.APPID |
| WF_EVENT_T.PARAMETER_LIST | SYS.AQ$_JMS_HEADER.GROUPID |
| WF_EVENT_T.PARAMETER_LIST | SYS.AQ$_JMS_HEADER.GROUPSEQ |
| WF_EVENT_T.PARAMETER_LIST (any parameters other than JMS header properties) | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.FROM_AGENT | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.TO_AGENT | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.ERROR_SUBSCRIPTION | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.ERROR_MESSAGE | SYS.AQ$_JMS_USERPROPARRAY |
| WF_EVENT_T.ERROR_STACK | SYS.AQ$_JMS_USERPROPARRAY |
See: Using Oracle Java Message Service (OJMS) to Access Oracle Streams AQ, Oracle Streams Advanced Queuing User's Guide and Reference and Package oracle.jms, Oracle Supplied Java Packages Reference.