Class TransactionWrapper
java.lang.Object
org.springframework.transaction.interceptor.TransactionAspectSupport
com.foreach.across.modules.hibernate.support.TransactionWrapper
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.InitializingBean
public class TransactionWrapper
extends org.springframework.transaction.interceptor.TransactionAspectSupport
Extension of
TransactionAspectSupport
thas accepts a callback function to be executed
in a fixed transaction. If an outer transaction is already present, it should be reused.
If no transaction active yet, a new one will be created with the default attributes.
Unless a different TransactionAttributeSource
is configured
the default transaction only has the PROPAGATION_REQUIRED attribute set.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport
org.springframework.transaction.interceptor.TransactionAspectSupport.TransactionInfo
-
Field Summary
Fields inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<R> R
protected String
methodIdentification
(Method method, Class<?> targetClass) Methods inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport
afterPropertiesSet, cleanupTransactionInfo, clearTransactionManagerCache, commitTransactionAfterReturning, completeTransactionAfterThrowing, createTransactionIfNecessary, currentTransactionInfo, currentTransactionStatus, determineTransactionManager, getBeanFactory, getTransactionAttributeSource, getTransactionManager, getTransactionManagerBeanName, invokeWithinTransaction, prepareTransactionInfo, setBeanFactory, setTransactionAttributes, setTransactionAttributeSource, setTransactionAttributeSources, setTransactionManager, setTransactionManagerBeanName
-
Constructor Details
-
TransactionWrapper
public TransactionWrapper()
-
-
Method Details
-
invokeWithinTransaction
public <R> R invokeWithinTransaction(TransactionWrapper.InvocationCallback<R> callback) throws Throwable - Throws:
Throwable
-
methodIdentification
- Overrides:
methodIdentification
in classorg.springframework.transaction.interceptor.TransactionAspectSupport
-