TransactionErrorBehavior
- Last Updated: August 25, 2021
- 1 minute read
- DataDirect Connectors
- JDBC
- PostgreSQL 6.0
- Documentation
Purpose
Determines how the driver handles errors that occur within a transaction. When an error occurs in a transaction, the PostgreSQL server does not allow any operations on the connection except for rolling back the transaction.
Valid Values
none|RollbackTransaction|RollbackSavepoint
Behavior
If
set to none, the driver does not roll back the transaction when
an error occurs. The application must handle the error and roll
back the transaction. Any operation on the statement other than
a rollback results in an error.
If set to RollbackTransaction,
the driver rolls back the transaction when an error occurs. In addition
to the original error message, the driver posts an error message
indicating that the transaction has been rolled back.
If set to RollbackSavepoint, the driver rolls back the transaction to the last savepoint when an error is detected. In manual commit mode, the driver automatically sets a savepoint after each statement issued. This value makes transaction behavior resemble that of most other database system types, but uses more resources on the database server and may incur a slight performance penalty.
Data Source Methods
public String
getTransactionErrorBehavior()
public void
setTransactionErrorBehavior(String)
Default
RollbackTransaction
Data Type
String