Other XLA Features
Changing the location of a bookmark and passing the application context are additional XLA features.
Changing the Location of a Bookmark
At any point during a connection, you can call the ttXlaGetLSN
function to query the system for the Current Read log record identifier.
See ttXlaGetLSN.
If you must replay a set of updates, you can use the ttXlaSetLSN
function to reset the Current Read log record identifier to any valid value larger than the Initial Read log record identifier set by the last ttXlaAcknowledge
call. In this context, "larger" only applies if the log record identifiers being compared are from records in the same transaction. If that is not the case, then any log record identifier from a transaction that committed before another transaction is the "smaller" log record identifier, even if the numeric value of the log record identifier is larger. The only way to enable the Initial Read log record identifier to move forward to the Current Read log record identifier is by calling the ttXlaAcknowledge
function, which indicates that you have received and processed all transaction log records up to the Current Read log record identifier. Once you have called ttXlaAcknowledge
on a particular bookmark, you can no longer access transaction log records with a log record identifier smaller than the Current Read log record identifier.
Passing Application Context
Although it is not an XLA function, writers to the transaction log can call the ttApplicationContext
built-in procedure to pass binary data associated with an application to XLA readers.
The ttApplicationContext
built-in procedure specifies a single VARBINARY
value that is returned in the next update record produced by the current transaction. XLA readers can obtain a pointer to this value as described in Reading NOT INLINE Variable-Length Column Data.
Note:
A context value is applied to only one update record. After it has been applied it is reset. If the same context value should be applied to multiple updates, then it must be reestablished before each update.
To set the context: