TRANSACTION-MODE AUTOMATIC statement
(AppServer only)Causes the procedure file that executes this statement to become an automatic transaction initiating procedure. This transaction initiating procedure allows you to control an automatic transaction in the context of an AppServer session.
Note: Does not apply to SpeedScript programming.Syntax
CHAINEDNotes
- This statement must appear before any other executable statement in a top-level persistent procedure (transaction initiating procedure) running on the AppServer.
- You can control an automatic transaction by accessing the attributes and methods of the transaction object. You can access these attributes and methods on the transaction handle returned by the TRANSACTION attribute of any AppServer procedure handle.
- An automatic transaction remains open in an AppServer session until:
- The current request service returns control to the client after an AppServer procedure invokes the transaction handle SET-COMMIT( ) method or SET-ROLLBACK( ) method.
- The transaction initiating procedure is deleted from the session.
- If you specify the CHAINED option, a transaction is always active in the AppServer session until either the transaction initiating procedure is deleted or the AppServer session terminates.
- If you do not specify the CHAINED option and the transaction initiating procedure is still active, after the current transaction terminates, a client application can start a new transaction by directly calling any remote internal procedure of the transaction initiating procedure. When so executed, this remote internal procedure (which can otherwise be empty) creates a new transaction that you can control using the transaction handle.
- As long as an automatic transaction is open, you can execute any internal procedure of the current transaction initiating procedure from any other procedure running on the AppServer. However, if no automatic transaction is open, only a client application can execute such an internal procedure as a remote procedure call, which then opens an automatic transaction. If an AppServer procedure tries to execute such an internal procedure with no automatic transaction open, the procedure call returns an error.
- If a transaction is open when you delete the transaction initiating procedure, the transaction is committed or rolled back according to the value of the transaction handle DEFAULT-COMMIT attribute.
See also
OpenEdge Release 10.2B
|