![]() Subtransaction, typically caused by an exception thrown by a data access operation Note:This flag only applies to an explicit rollback attempt for a Neither is it for a sequence of JDBC insert/update/delete operations. However, note that this will only work as long as all participating resourcesĪre capable of continuing towards a transaction commit even after a data accessįailure: This is generally not the case for a Hibernate Session, for example If a participating transaction fails with an exception, the callerĬan still decide to continue with a different path within the transaction. Switch this to "false" to let the transaction originator make the rollbackĭecision. Transaction originator cannot make the transaction commit anymore. The only possible outcome of such a transaction is a rollback: The Transaction) fails, the transaction will be globally marked as rollback-only. PROPAGATION_REQUIRED or PROPAGATION_SUPPORTS encountering an existing Set whether to globally mark an existing transaction as rollback-onlyĪfter a participating transaction failed.ĭefault is "true": If a participating transaction (e.g. To Java serialization rules) if they need to restore any transient state. That case, and potentially a private readObject() method (according They should implement the java.io.Serializable marker interface in It is up to subclasses if they wish to make their state to be serializable too. Transaction strategy along with proxies that carry a transaction interceptor. The state of this class is serializable, to allow for serializing the ![]() The same mechanism canĪlso be leveraged for custom synchronization needs in an application. Of the same Hibernate Session within the transaction. Transaction for closing at transaction completion time, allowing e.g. Within a JTA transaction: They register resources that are opened within the This is mainly used internallyīy the data access support classes for JDBC, Hibernate, JPA, etc when running That get invoked at transaction completion time. Transaction synchronization is a generic mechanism for registering callbacks Implementation for the rest, defaults are provided, so overriding is optional. The most important of them are abstract and must be provided by a concrete States of a transaction, e.g.: begin, suspend, resume, commit, rollback. Subclasses have to implement specific template methods for specific (if transaction synchronization is active). triggers registered synchronization callbacks.(actual rollback or setting rollback-only) applies the appropriate modification on rollback.checks the rollback-only flag on commit.suspends and resumes transactions if necessary.applies the appropriate propagation behavior.determines if there is an existing transaction.This base class provides the following workflow handling: Serving as basis for concrete platform transaction managers like Abstract base class that implements Spring's standard transaction workflow,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |