类的使用
org.springframework.transaction.TransactionException
使用TransactionException的程序包 程序包 说明 org.springframework.jca.cci.connection Provides a utility class for easy ConnectionFactory access, a PlatformTransactionManager for local CCI transactions, and various simple ConnectionFactory proxies/adapters.org.springframework.jdbc.datasource Provides a utility class for easy DataSource access, a PlatformTransactionManager for a single DataSource, and various simple DataSource implementations.org.springframework.orm.jpa Package providing integration of JPA (Java Persistence API) with Spring concepts.org.springframework.orm.jpa.vendor Support classes for adapting to specific JPA vendors.org.springframework.transaction Spring's core transaction management APIs (independent of any specific transaction management system); an exception hierarchy for Spring's transaction infrastructure; and transaction manager, definition, and status interfaces.org.springframework.transaction.jta Transaction SPI implementation for JTA.org.springframework.transaction.reactive Support classes for reactive transaction management.org.springframework.transaction.support Support classes for the org.springframework.transaction package.org.springframework.jca.cci.connection中TransactionException的使用
抛出TransactionException的org.springframework.jca.cci.connection中的方法 修饰符和类型 方法 说明 protected booleanCciLocalTransactionManager. isRollbackOnly(Object transaction)org.springframework.jdbc.datasource中TransactionException的使用
抛出TransactionException的org.springframework.jdbc.datasource中的方法 修饰符和类型 方法 说明 ObjectJdbcTransactionObjectSupport. createSavepoint()This implementation creates a JDBC 3.0 Savepoint and returns it.protected ConnectionHolderJdbcTransactionObjectSupport. getConnectionHolderForSavepoint()voidJdbcTransactionObjectSupport. releaseSavepoint(Object savepoint)This implementation releases the given JDBC 3.0 Savepoint.voidJdbcTransactionObjectSupport. rollbackToSavepoint(Object savepoint)This implementation rolls back to the given JDBC 3.0 Savepoint.org.springframework.orm.jpa中TransactionException的使用
抛出TransactionException的org.springframework.orm.jpa中的方法 修饰符和类型 方法 说明 ObjectDefaultJpaDialect. beginTransaction(EntityManager entityManager, TransactionDefinition definition)This implementation invokes the standard JPATransaction.beginmethod.ObjectJpaDialect. beginTransaction(EntityManager entityManager, TransactionDefinition definition)Begin the given JPA transaction, applying the semantics specified by the given Spring transaction definition (in particular, an isolation level and a timeout).org.springframework.orm.jpa.vendor中TransactionException的使用
抛出TransactionException的org.springframework.orm.jpa.vendor中的方法 修饰符和类型 方法 说明 ObjectEclipseLinkJpaDialect. beginTransaction(EntityManager entityManager, TransactionDefinition definition)ObjectHibernateJpaDialect. beginTransaction(EntityManager entityManager, TransactionDefinition definition)org.springframework.transaction中TransactionException的使用
org.springframework.transaction中TransactionException的子类 修饰符和类型 类 说明 classCannotCreateTransactionExceptionException thrown when a transaction can't be created using an underlying transaction API such as JTA.classHeuristicCompletionExceptionException that represents a transaction failure caused by a heuristic decision on the side of the transaction coordinator.classIllegalTransactionStateExceptionException thrown when the existence or non-existence of a transaction amounts to an illegal state according to the transaction propagation behavior that applies.classInvalidIsolationLevelExceptionException that gets thrown when an invalid isolation level is specified, i.e. an isolation level that the transaction manager implementation doesn't support.classInvalidTimeoutExceptionException 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.classNestedTransactionNotSupportedExceptionException thrown when attempting to work with a nested transaction but nested transactions are not supported by the underlying backend.classNoTransactionExceptionException thrown when an operation is attempted that relies on an existing transaction (such as setting rollback status) and there is no existing transaction.classTransactionSuspensionNotSupportedExceptionException thrown when attempting to suspend an existing transaction but transaction suspension is not supported by the underlying backend.classTransactionSystemExceptionException thrown when a general transaction system error is encountered, like on commit or rollback.classTransactionTimedOutExceptionException to be thrown when a transaction has timed out.classTransactionUsageExceptionSuperclass for exceptions caused by inappropriate usage of a Spring transaction API.classUnexpectedRollbackExceptionThrown when an attempt to commit a transaction resulted in an unexpected rollback.抛出TransactionException的org.springframework.transaction中的方法 修饰符和类型 方法 说明 voidPlatformTransactionManager. commit(TransactionStatus status)Commit the given transaction, with regard to its status.reactor.core.publisher.Mono<Void>ReactiveTransactionManager. commit(ReactiveTransaction transaction)Commit the given transaction, with regard to its status.ObjectSavepointManager. createSavepoint()Create a new savepoint.reactor.core.publisher.Mono<ReactiveTransaction>ReactiveTransactionManager. getReactiveTransaction(TransactionDefinition definition)Emit a currently active reactive transaction or create a new one, according to the specified propagation behavior.TransactionStatusPlatformTransactionManager. getTransaction(TransactionDefinition definition)Return a currently active transaction or create a new one, according to the specified propagation behavior.voidSavepointManager. releaseSavepoint(Object savepoint)Explicitly release the given savepoint.voidPlatformTransactionManager. rollback(TransactionStatus status)Perform a rollback of the given transaction.reactor.core.publisher.Mono<Void>ReactiveTransactionManager. rollback(ReactiveTransaction transaction)Perform a rollback of the given transaction.voidSavepointManager. rollbackToSavepoint(Object savepoint)Roll back to the given savepoint.org.springframework.transaction.jta中TransactionException的使用
抛出TransactionException的org.springframework.transaction.jta中的方法 修饰符和类型 方法 说明 <T> TWebSphereUowTransactionManager. execute(TransactionDefinition definition, TransactionCallback<T> callback)org.springframework.transaction.reactive中TransactionException的使用
抛出TransactionException的org.springframework.transaction.reactive中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. commit(ReactiveTransaction transaction)This implementation of commit handles participating in existing transactions and programmatic rollback requests.protected abstract reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. doBegin(TransactionSynchronizationManager synchronizationManager, Object transaction, TransactionDefinition definition)Begin a new transaction with semantics according to the given transaction definition.protected abstract reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. doCommit(TransactionSynchronizationManager synchronizationManager, GenericReactiveTransaction status)Perform an actual commit of the given transaction.protected abstract ObjectAbstractReactiveTransactionManager. doGetTransaction(TransactionSynchronizationManager synchronizationManager)Return a transaction object for the current transaction state.protected reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. doResume(TransactionSynchronizationManager synchronizationManager, Object transaction, Object suspendedResources)Resume the resources of the current transaction.protected abstract reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. doRollback(TransactionSynchronizationManager synchronizationManager, GenericReactiveTransaction status)Perform an actual rollback of the given transaction.protected reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. doSetRollbackOnly(TransactionSynchronizationManager synchronizationManager, GenericReactiveTransaction status)Set the given transaction rollback-only.protected reactor.core.publisher.Mono<Object>AbstractReactiveTransactionManager. doSuspend(TransactionSynchronizationManager synchronizationManager, Object transaction)Suspend the resources of the current transaction.<T> reactor.core.publisher.Flux<T>TransactionalOperator. execute(TransactionCallback<T> action)Execute the action specified by the given callback object within a transaction.reactor.core.publisher.Mono<ReactiveTransaction>AbstractReactiveTransactionManager. getReactiveTransaction(TransactionDefinition definition)This implementation handles propagation behavior.protected booleanAbstractReactiveTransactionManager. isExistingTransaction(Object transaction)Check if the given transaction object indicates an existing transaction (that is, a transaction which has already started).protected reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. registerAfterCompletionWithExistingTransaction(TransactionSynchronizationManager synchronizationManager, Object transaction, List<TransactionSynchronization> synchronizations)Register the given list of transaction synchronizations with the existing transaction.reactor.core.publisher.Mono<Void>AbstractReactiveTransactionManager. rollback(ReactiveTransaction transaction)This implementation of rollback handles participating in existing transactions.org.springframework.transaction.support中TransactionException的使用
抛出TransactionException的org.springframework.transaction.support中的方法 修饰符和类型 方法 说明 voidAbstractPlatformTransactionManager. commit(TransactionStatus status)This implementation of commit handles participating in existing transactions and programmatic rollback requests.voidAbstractTransactionStatus. createAndHoldSavepoint()Create a savepoint and hold it for the transaction.ObjectAbstractTransactionStatus. createSavepoint()This implementation delegates to a SavepointManager for the underlying transaction, if possible.protected abstract voidAbstractPlatformTransactionManager. doBegin(Object transaction, TransactionDefinition definition)Begin a new transaction with semantics according to the given transaction definition.protected abstract voidAbstractPlatformTransactionManager. doCommit(DefaultTransactionStatus status)Perform an actual commit of the given transaction.protected abstract ObjectAbstractPlatformTransactionManager. doGetTransaction()Return a transaction object for the current transaction state.protected voidAbstractPlatformTransactionManager. doResume(Object transaction, Object suspendedResources)Resume the resources of the current transaction.protected abstract voidAbstractPlatformTransactionManager. doRollback(DefaultTransactionStatus status)Perform an actual rollback of the given transaction.protected voidAbstractPlatformTransactionManager. doSetRollbackOnly(DefaultTransactionStatus status)Set the given transaction rollback-only.protected ObjectAbstractPlatformTransactionManager. doSuspend(Object transaction)Suspend the resources of the current transaction.<T> TCallbackPreferringPlatformTransactionManager. execute(TransactionDefinition definition, TransactionCallback<T> callback)Execute the action specified by the given callback object within a transaction.<T> TTransactionOperations. execute(TransactionCallback<T> action)Execute the action specified by the given callback object within a transaction.<T> TTransactionTemplate. execute(TransactionCallback<T> action)default voidTransactionOperations. executeWithoutResult(Consumer<TransactionStatus> action)Execute the action specified by the givenRunnablewithin a transaction.TransactionStatusAbstractPlatformTransactionManager. getTransaction(TransactionDefinition definition)This implementation handles propagation behavior.protected booleanAbstractPlatformTransactionManager. isExistingTransaction(Object transaction)Check if the given transaction object indicates an existing transaction (that is, a transaction which has already started).protected voidAbstractPlatformTransactionManager. registerAfterCompletionWithExistingTransaction(Object transaction, List<TransactionSynchronization> synchronizations)Register the given list of transaction synchronizations with the existing transaction.voidAbstractTransactionStatus. releaseHeldSavepoint()Release the savepoint that is held for the transaction.voidAbstractTransactionStatus. releaseSavepoint(Object savepoint)This implementation delegates to a SavepointManager for the underlying transaction, if possible.protected voidAbstractPlatformTransactionManager. resume(Object transaction, AbstractPlatformTransactionManager.SuspendedResourcesHolder resourcesHolder)Resume the given transaction.voidAbstractPlatformTransactionManager. rollback(TransactionStatus status)This implementation of rollback handles participating in existing transactions.voidAbstractTransactionStatus. rollbackToHeldSavepoint()Roll back to the savepoint that is held for the transaction and release the savepoint right afterwards.voidAbstractTransactionStatus. rollbackToSavepoint(Object savepoint)This implementation delegates to a SavepointManager for the underlying transaction, if possible.protected AbstractPlatformTransactionManager.SuspendedResourcesHolderAbstractPlatformTransactionManager. suspend(Object transaction)Suspend the given transaction.