Class JtaIsolationDelegate
- java.lang.Object
-
- org.hibernate.resource.transaction.backend.jta.internal.JtaIsolationDelegate
-
- All Implemented Interfaces:
IsolationDelegate
public class JtaIsolationDelegate extends Object implements IsolationDelegate
An isolation delegate for JTA environments.
-
-
Constructor Summary
Constructors Constructor Description JtaIsolationDelegate(JdbcConnectionAccess connectionAccess, SqlExceptionHelper sqlExceptionHelper, TransactionManager transactionManager)
JtaIsolationDelegate(JdbcSessionOwner jdbcSessionOwner, TransactionManager transactionManager)
JtaIsolationDelegate(TransactionCoordinatorOwner transactionCoordinatorOwner, TransactionManager transactionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
delegateCallable(Callable<T> callable, boolean transacted)
Invoke the given callable in isolation from current transaction.<T> T
delegateWork(WorkExecutorVisitable<T> work, boolean transacted)
Perform the given work in isolation from current transaction.protected JdbcConnectionAccess
jdbcConnectionAccess()
protected SqlExceptionHelper
sqlExceptionHelper()
-
-
-
Constructor Detail
-
JtaIsolationDelegate
public JtaIsolationDelegate(TransactionCoordinatorOwner transactionCoordinatorOwner, TransactionManager transactionManager)
-
JtaIsolationDelegate
public JtaIsolationDelegate(JdbcSessionOwner jdbcSessionOwner, TransactionManager transactionManager)
-
JtaIsolationDelegate
public JtaIsolationDelegate(JdbcConnectionAccess connectionAccess, SqlExceptionHelper sqlExceptionHelper, TransactionManager transactionManager)
-
-
Method Detail
-
jdbcConnectionAccess
protected JdbcConnectionAccess jdbcConnectionAccess()
-
sqlExceptionHelper
protected SqlExceptionHelper sqlExceptionHelper()
-
delegateWork
public <T> T delegateWork(WorkExecutorVisitable<T> work, boolean transacted) throws HibernateException
Description copied from interface:IsolationDelegate
Perform the given work in isolation from current transaction.- Specified by:
delegateWork
in interfaceIsolationDelegate
- Parameters:
work
- The work to be performed.transacted
- Should the work itself be done in a (isolated) transaction?- Returns:
- The work result
- Throws:
HibernateException
- Indicates a problem performing the work.
-
delegateCallable
public <T> T delegateCallable(Callable<T> callable, boolean transacted) throws HibernateException
Description copied from interface:IsolationDelegate
Invoke the given callable in isolation from current transaction.- Specified by:
delegateCallable
in interfaceIsolationDelegate
- Parameters:
callable
- The callable to be invoked.transacted
- Should the work itself be done in a (isolated) transaction?- Returns:
- The work result
- Throws:
HibernateException
- Indicates a problem performing the work.
-
-