Progress
Programming
Handbook
Transaction Management
Transactions behave for persistent procedures in exactly the same way as for non-persistent procedures. If a transaction (or subtransaction) begins during execution of an instantiating RUN statement, the transaction is not held open pending deletion of the procedure context. Thus, the transaction is accepted or rejected by the time the instantiating procedure returns to its caller.
The same is true for any trigger or internal procedure defined in the persistent procedure context that opens a transaction or subtransaction. If you want to undo work done by a trigger or internal procedure defined by a persistent procedure, you must enclose it within a transaction bound entirely by the context of the trigger or internal procedure block. Otherwise, the transaction completes when the trigger or internal procedure returns and cannot be undone. Thus, persistent procedures encourage the use of atomic transactions no larger than the context of an encapsulated trigger or internal procedure.
For more information on transaction management, see Transactions."
UNDO Processing
Any database work subject to UNDO that also creates a persistent procedure can be undone. However, the persistent procedure context remains persistent. In other words, UNDO does not delete any persistent procedures. Otherwise, all records that can be disconnected for UNDO during execution of a non-persistent procedure, can also be disconnected during instantiation of a persistent procedure.
Schema Changes and Schema Locks
If your application makes a change to the schema of a database, and another procedure tries to access a table in that database, Progress automatically restarts the application and any persistent procedures created during the session are deleted.
If a persistent procedure accesses a database table during its instantiating execution, the schema share lock that it obtains remains in effect until the procedure is deleted.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |