Chapter 5 C Routines Reference


JagIsRollbackOnly

Description

Query whether the current transaction is doomed to be rolled back or is still viable.

Syntax

JagBoolean JagIsRollbackOnly()

Return Values

JAG_TRUE if the current transaction is doomed, in other words, it can never be committed. If executing outside of any transaction, returns JAG_FALSE.

Usage

Transactional components that issue intercomponent method calls should call JagIsRollbackOnly afterward to determine whether the current transaction is still viable. If not, the method should clean up and call JagRollbackWork to deactivate the current instance.

Transactions are doomed when a participating component has called JagRollbackWork (or its equivalent if the component is a Java or ActiveX component). Work performed by participating components is rolled back when the root component of the transaction deactivates.

See Also

JagInTransaction, JagRollbackWork

"Understanding Transactions and Component Lifecycle Models" in the Jaguar CTS Programmer's Guide

 


Copyright © 2000 Sybase, Inc. All rights reserved.