Methods in a transactional component should call one of the transaction state primitive routines listed in Chapter 5, “C Routines Reference,” of the EAServer API Reference.
Even if your component is not transactional, you should call one of these methods to explicitly specify whether the instance should be deactivated.
For transactional components, choose the routine that reflects the state of the work that the component is contributing to the transaction, as follows:
If the work is complete and without error, call JagCompleteWork.
If the work is not necessarily finished, but not in error, call JagContinueWork.
If the work is not finished and not ready for commit, call JagDisallowCommit.
If the work cannot be completed, call JagRollbackWork (you should also log a description of the error and send an error to the client, as described in “Handle errors in your C component”).
For nontransactional components, call either JagCompleteWork or JagRollbackWork to deactivate and destroy the component instance. To keep the instance active, call JagContinueWork or JagDisallowCommit.
If a method does not explicitly set transaction state before returning, the default behavior is JagContinueWork.
Copyright © 2005. Sybase Inc. All rights reserved. |