JMS/XLA MapMessage Contents
A jakarta.jms.MapMessage
instance for Jakarta JMS or
javax.jms.MapMessage
instance for JavaX JMS contains a set
of typed name/value pairs corresponding to the fields in an XLA update header, which
is published as the C structure ttXlaUpdateDesc_t
.
The fields contained in a MapMessage
instance depend on what type of update it is.
XLA Update Types
Each MapMessage
instance returned by the JMS/XLA API contains at least one name/value pair, __TYPE
(with 2 underscores), that identifies the type of update described in the message. The types are specified as integer values.
Table 6-1 lists the supported types.
Note:
As a convenience, you can use the constants defined in
com.timesten.dataserver.jakartajmsxla.XLAConstants
for Jakata JMS or
com.timesten.dataserver.jmsxla.XlaConstants
for JavaX JMS to compare against the integer
types.
Table 6-1 XLA Update Types
Type | Description |
---|---|
|
Indicates that columns have been added. |
|
This is the name of the field in a message that contains a commit. |
|
Indicates that a commit has occurred. |
|
This is the name of the field in a message that contains the context value passed to the |
|
Indicates that an index has been created. |
|
Indicates that a sequence has been created. |
|
Indicates that a synonym has been created. |
|
Indicates that a table has been created. |
|
Indicates that a view has been created. |
|
Indicates that a row has been deleted. |
|
Indicates that columns have been dropped. |
|
Indicates that an index has been dropped. |
|
Indicates that a sequence has been dropped. |
|
Indicates that a synonym has been dropped. |
|
Indicates that a table has been dropped. |
|
Indicates that a view has been dropped. |
|
This is the name of the field that contains the flag that indicates the first record in a transaction. |
|
Indicates that a row has been inserted. |
|
This is the name of the field in a message that contains type information. |
|
This is the name of the field in a message that contains the transaction log file number of the XLA record. |
|
This is the name of the field in a message that contains the list of fields that have null values. |
|
This is the name of the field in a message that contains the flag that indicates that the update was applied by replication. |
|
This is the name of the field in a message that contains the table name. |
|
This is the name of the field in a message that specifies the table owner. |
|
Indicates that a table has been truncated. |
|
This is the name of the field in a message that specifies the message type. |
|
Indicates that a row has been updated. |
|
This is the name of the field that returns a |
|
This is the name of the field in a message that contains the list of updated columns. |
XLA Flags
For all update types, the MapMessage
instance contains name/value pairs that indicate the following.
-
Whether this is the first record of a transaction
-
Whether this is the last record of a transaction
-
Whether the update was performed by replication
-
Which table was updated
-
The owner of the updated table
The name/value pairs that contain these XLA flags are described in Table 6-2. Each name is preceded by two underscores.
Table 6-2 JMS/XLA Flags
Name | Description | Corresponding ttXlaUpdateDesc_t Flag |
---|---|---|
|
Indicates that a delete was due to aging. The flag is present only if the XLA update record is due to an aging delete. The |
|
|
Indicates that a delete was due to a cascading delete. The flag is present only if the XLA update record is due to a cascading delete. The |
|
|
Indicates that this is the last record in a transaction and that a commit was performed after this operation. This is in the |
|
|
Indicates that this is the first record in a new transaction. This is in the |
|
|
Indicates that this change was applied to the database through replication. This is in the |
|
|
This is only used for |
|
Note:
The XlaConstants
interface is in the com.timesten.dataserver.jmsxla
package.
Applications can use the MapMessage
method itemExists()
to determine whether a flag is present, and getBoolean()
to determine whether a flag is set. As input, specify the XlaConstants
constant that corresponds to the flag, such as XlaConstants.AGING_DELETE_FIELD
.
Equivalent to using TT_UPDCOMMIT
in XLA, you can use the following test in JMS/XLA to see whether this is the last record in a transaction and that a commit was performed after the operation.
if (MapMessage.getBoolean(XlaConstants.COMMIT_FIELD) ) { // Field is set
...
}