Adaptive Server/CIS requires an access service to support some aspects of the Adaptive
Server transaction model.
If the access service is configured correctly for Adatpive Server/CIS, and if it recognizes the
Adaptive Server/CIS client application, it supports the transaction model. The model
includes these statements:
-
begin tran
-
prepare tran
-
commit or rollback
Note: This is a limited implementation of the Adaptive Server transaction model and is available only
for Adaptive Server/CIS. Other applications cannot use these features.
To process Adaptive Server/CIS transactions, you must set the transaction mode and transform
level parameters.
See the Adaptive Server Enterprise Component Integration Services Guide.
If all conditions are met, the transaction statements are
handled as:
begin tran statement
The access service:
-
Sets a flag to indicate it is in an Adaptive Server/CIS transaction.
Sets the transaction mode to long.
Returns a successful status, as if a set command was executed.
Other considerations:
-
Nested transactions are not required nor are they supported.
-
Adaptive Server/CIS does not issue this statement if outstanding changes
were not committed or rolled back.
-
The access service issues a commit prior to handling
the statement.
prepare tran statement
If the access service is in an Adaptive Server/CIS transaction, it:
This statement is issued in preparation for a commit statement.
commit or rollback statement
If the access service is in an Adatpive Server/CIS transaction, it:
-
Resets the flag that indicates it is in an Adaptive Server/CIS
transaction.
-
Resets the mode to short.
-
Returns a success or failure status of the commit or
rollback statement to Adaptive Server/CIS.
Adaptive Server/CIS expects the access service to be in
short transaction mode
unless:
Because the access service automatically switches to long transaction mode
when a cursor is declared or when a dynamic event prepare tran
occurs, it backs out of this mode when the last cursor and prepared statement are
deallocated and not in a begin tran block.
Note: Adaptive Server/CIS always issues dynamic events within its own transaction, so it is not
necessary to back out when the last dynamic statement is freed.
In the event of a rollback, the access service issues a commit and sets the
transaction mode to short.