Transaction mode = long

The following four tables show the effects of StopCondition and Allocate properties, based on a TransactionMode setting of long.


Allocate = request, StopCondition = error

Table 5-5 shows the effects of a TransactionMode property setting of long, an Allocate property of request, and a StopCondition of error.

Table 5-5: TransactionMode = long, Allocate = request, StopCondition = error

Condition/Status

Effect of settings on processing

Does a rollback occur on an error?

A rollback does not occur.

What is the status of the connection after an error occurs?

The connection continues.

What happens if a begin transaction occurs?

The begin transaction is ignored.

When the client application issues a commit or rollback, what happens?

If TransactionMode was originally short, and cursors and dynamics were all freed, the commit or rollback occurs and TransactionMode changes back to short. If TransactionMode was originally long, then a commit or rollback occurs.

If the request is a cursor or dynamic request, how does it behave?

If TransactionMode was originally short, and cursors and dynamics were all freed, a commit occurs and TransactionMode changes back to short. If TransactionMode was originally long, then the connection behaves the same as Allocate=request until all cursors and dynamics are freed.

In batch mode, what happens if an error occurs?

The batch transaction ends.

When completed, is a batch job committed?

The batch does not commit.

After the batch commits, what is the status of the connection?

The connection ends if the commit or rollback occurs at the end of batch. Otherwise, the connection continues.


Allocate = request, StopCondition = none

Table 5-6 shows the effects of a TransactionMode property setting of long, an Allocate property of request, and a StopCondition of none.

Table 5-6: TransactionMode = long, Allocate = request, StopCondition = none

Condition/Status

Effects of settings on processing

Does a rollback occur on an error?

A rollback does not occur.

What is the status of the connection after an error occurs?

The connection continues.

What happens if a begin transaction occurs?

The DB2 access service ignores the begin transaction command.

When the client application issues a commit or rollback, what happens?

If TransactionMode was originally short, and cursors and dynamics were all freed, the commit or rollback occurs and TransactionMode changes back to short. If TransactionMode was originally long, then a commit or rollback occurs.

If the request is a cursor or dynamic request, how does it behave?

If TransactionMode was originally short, and cursors and dynamics were all freed, a commit occurs and TransactionMode changes back to short. If TransactionMode was originally long, then the connection behaves the same as Allocate=request until all cursors and dynamics are freed.

While in batch, what happens if an error occurs?

The batch continues.

When completed, is a batch job committed?

The batch does not commit.

After the batch commits, what is the status of the connection?

The connection ends if the commit or rollback occurs at the end of the batch. Otherwise, the connection continues.


Allocate = connect. StopCondition = error

Table 5-7 shows the effects of a TransactionMode property setting of long, an Allocate property of connect, and a StopCondition of error.

Table 5-7: TransactionMode = long, Allocate = connect, StopCondition = error

Condition/Status

Effects of settings on processing

Does a rollback occur on an error?

A rollback does not occur.

What is the status of the connection after an error occurs?

The connection continues.

What happens if a begin transaction occurs?

The DB2 access service ignores the begin transaction command.

When the client application issues a commit or rollback, what happens?

If TransactionMode was originally short, and cursors and dynamics were all freed, the commit or rollback occurs and TransactionMode changes back to short. If TransactionMode was originally long, then a commit or rollback occurs.

If the request is a cursor or dynamic request, how does it behave?

If TransactionMode was originally short, and cursors and dynamics were all freed, the commit occurs and TransactionMode changes back to short. If TransactionMode was originally long, then the connection behaves the same as Allocate=request until all cursors and dynamics are freed.

While in batch, what happens if an error occurs?

The batch request ends.

When completed, is a batch job committed?

The batch does not commit.

After the batch commits, what is the status of the connection?

The connection continues.


Allocate = connect, StopCondition = none

Table 5-8 shows the effects of a TransactionMode property setting of long, an Allocate property of connect, and a StopCondition of none.

Table 5-8: TransactionMode = long, Allocate = connect, StopCondition = none

Condition/Status

Effects of settings on processing

Does a rollback occur on an error?

A rollback does not occur.

What is the status of the connection after an error occurs?

The connection continues.

What happens if a begin transaction occurs?

The DB2 access service ignores the begin transaction command.

When the client application issues a commit or rollback, what happens?

If TransactionMode was originally short, and cursors and dynamics were all freed, the commit or rollback occurs and TransactionMode changes back to short. If TransactionMode was originally long, then a commit or rollback occurs.

If the request is a cursor or dynamic request, how does it behave?

If TransactionMode was originally short, and cursors and dynamics were all freed, a commit occurs and TransactionMode changes back to short. If TransactionMode was originally long, then the connection behaves the same as Allocate=request until all cursors and dynamics are freed.

In batch mode, what happens if an error occurs?

The batch continues.

When completed, is a batch job committed?

The batch does not commit.

After the batch commits, what is the status of the connection?

The connection continues.