Transaction state is set using an IObjectContext interface pointer. The IObjectContext interface can be directly accessed only if you are coding the component in C++.
In C++, call GetObjectContext to obtain a reference to an IObjectContext object. Call the appropriate IObjectContext method to set transactional state before returning from the method:
Call SetComplete, if the instance has completed its work without error.
Call EnableCommit, if the work is not necessarily finished but not in error.
Call DisableCommit, if the work is still in progress and has errors.
Call SetAbort if the work cannot be completed.
For nontransactional components, either SetComplete or SetAbort deactivates the component instance. To keep the instance active, call DisableCommit or EnableCommit.
If a method does not explicitly set transaction state before returning, the default behavior is EnableCommit.
Copyright © 2005. Sybase Inc. All rights reserved. |