spring-framework / org.springframework.transaction

Package org.springframework.transaction

Exceptions

CannotCreateTransactionException

open class CannotCreateTransactionException : TransactionException

Exception thrown when a transaction can't be created using an underlying transaction API such as JTA.

HeuristicCompletionException

open class HeuristicCompletionException : TransactionException

Exception that represents a transaction failure caused by a heuristic decision on the side of the transaction coordinator.

IllegalTransactionStateException

open class IllegalTransactionStateException : TransactionUsageException

Exception thrown when the existence or non-existence of a transaction amounts to an illegal state according to the transaction propagation behavior that applies.

InvalidIsolationLevelException

open class InvalidIsolationLevelException : TransactionUsageException

Exception that gets thrown when an invalid isolation level is specified, i.e. an isolation level that the transaction manager implementation doesn't support.

InvalidTimeoutException

open class InvalidTimeoutException : TransactionUsageException

Exception that gets thrown when an invalid timeout is specified, that is, the specified timeout valid is out of range or the transaction manager implementation doesn't support timeouts.

NestedTransactionNotSupportedException

open class NestedTransactionNotSupportedException : CannotCreateTransactionException

Exception thrown when attempting to work with a nested transaction but nested transactions are not supported by the underlying backend.

NoTransactionException

open class NoTransactionException : TransactionUsageException

Exception thrown when an operation is attempted that relies on an existing transaction (such as setting rollback status) and there is no existing transaction. This represents an illegal usage of the transaction API.

TransactionSuspensionNotSupportedException

open class TransactionSuspensionNotSupportedException : CannotCreateTransactionException

Exception thrown when attempting to suspend an existing transaction but transaction suspension is not supported by the underlying backend.

TransactionSystemException

open class TransactionSystemException : TransactionException

Exception thrown when a general transaction system error is encountered, like on commit or rollback.

TransactionTimedOutException

open class TransactionTimedOutException : TransactionException

Exception to be thrown when a transaction has timed out.

Thrown by Spring's local transaction strategies if the deadline for a transaction has been reached when an operation is attempted, according to the timeout specified for the given transaction.

Beyond such checks before each transactional operation, Spring's local transaction strategies will also pass appropriate timeout values to resource operations (for example to JDBC Statements, letting the JDBC driver respect the timeout). Such operations will usually throw native resource exceptions (for example, JDBC SQLExceptions) if their operation timeout has been exceeded, to be converted to Spring's DataAccessException in the respective DAO (which might use Spring's JdbcTemplate, for example).

In a JTA environment, it is up to the JTA transaction coordinator to apply transaction timeouts. Usually, the corresponding JTA-aware connection pool will perform timeout checks and throw corresponding native resource exceptions (for example, JDBC SQLExceptions).

UnexpectedRollbackException

open class UnexpectedRollbackException : TransactionException

Thrown when an attempt to commit a transaction resulted in an unexpected rollback.