Indicate that the current transaction cannot be committed because the component’s work has not been completed; the instance remains active after the current method returns.
void JagDisallowCommit();
JagDisallowCommit specifies that the component instance should not be automatically deactivated after the current method completes. If the instance is deactivated before the next method invocation, the current transaction is rolled back.
When a method calls JagDisallowCommit, the component instance is not deactivated until one of the following happens:
The component’s stub is destroyed explicitly by the client.
The client disconnects without explicitly destroying the stub (the current transaction is always rolled back in this case).
The component instance calls JagCompleteWork or JagRollbackWork during a subsequent method invocation.
JagContinueWork and JagDisallowCommit allow components to maintain state between method calls (using JagGetInstanceData and JagSetInstanceData). If a component is not transactional, JagContinueWork and JagDisableCommit have the same effect: both prevent immediate deactivation of the component.
If a method calls none of JagCompleteWork, JagContinueWork, JagDisallowCommit, or JagRollbackWork, the default behavior is that of JagContinueWork.
JagCompleteWork, JagContinueWork, JagIsRollbackOnly, JagRollbackWork
Chapter 2, “Understanding Transactions and Component Lifecycles,” in the EAServer Programmer’s Guide
Copyright © 2005. Sybase Inc. All rights reserved. |