Top Description Inners Fields Constructors Methods
org.hibernate.resource.transaction.backend.jta.internal

public Class JtaIsolationDelegate

extends Object
implements IsolationDelegate
Class Inheritance
All Implemented Interfaces
org.hibernate.resource.transaction.spi.IsolationDelegate
Imports
jakarta.transaction.NotSupportedException, .SystemException, .Transaction, .TransactionManager, java.sql.Connection, .SQLException, java.util.concurrent.Callable, org.hibernate.HibernateException, org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess, org.hibernate.engine.jdbc.spi.SqlExceptionHelper, org.hibernate.resource.jdbc.spi.JdbcSessionOwner, org.hibernate.resource.transaction.spi.IsolationDelegate, .TransactionCoordinatorOwner, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.ExceptionHelper, org.hibernate.jdbc.WorkExecutor, .WorkExecutorVisitable

An isolation delegate for JTA environments.
Author
Andrea Boriero

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface

Field Summary

Modifier and TypeField and Description
private final JdbcConnectionAccess
private static final CoreMessageLogger
private final SqlExceptionHelper
private final TransactionManager

Constructor Summary

AccessConstructor and Description
public
JtaIsolationDelegate(TransactionCoordinatorOwner transactionCoordinatorOwner, TransactionManager transactionManager)

public
JtaIsolationDelegate(JdbcSessionOwner jdbcSessionOwner, TransactionManager transactionManager)

public
JtaIsolationDelegate(JdbcConnectionAccess connectionAccess, SqlExceptionHelper sqlExceptionHelper, TransactionManager transactionManager)

Method Summary

Modifier and TypeMethod and Description
private static <T> T
call(final Callable<T> callable)

public <T> T
delegateCallable(final Callable<T>
The callable to be invoked.
callable
,
final boolean
Should the work itself be done in a (isolated) transaction?
transacted
)

Implements org.hibernate.resource.transaction.spi.IsolationDelegate.delegateCallable.

Invoke the given callable in isolation from current transaction.
public <T> T
delegateWork(final WorkExecutorVisitable<T>
The work to be performed.
work
,
final boolean
Should the work itself be done in a (isolated) transaction?
transacted
)

Implements org.hibernate.resource.transaction.spi.IsolationDelegate.delegateWork.

Perform the given work in isolation from current transaction.
private <T> T
private <T> T
private <T> T
protected JdbcConnectionAccess
protected SqlExceptionHelper
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionAccessback to summary
private final JdbcConnectionAccess connectionAccess
LOGback to summary
private static final CoreMessageLogger LOG
sqlExceptionHelperback to summary
private final SqlExceptionHelper sqlExceptionHelper
transactionManagerback to summary
private final TransactionManager transactionManager

Constructor Detail

JtaIsolationDelegateback to summary
public JtaIsolationDelegate(TransactionCoordinatorOwner transactionCoordinatorOwner, TransactionManager transactionManager)
JtaIsolationDelegateback to summary
public JtaIsolationDelegate(JdbcSessionOwner jdbcSessionOwner, TransactionManager transactionManager)
JtaIsolationDelegateback to summary
public JtaIsolationDelegate(JdbcConnectionAccess connectionAccess, SqlExceptionHelper sqlExceptionHelper, TransactionManager transactionManager)

Method Detail

callback to summary
private static <T> T call(final Callable<T> callable)
delegateCallableback to summary
public <T> T delegateCallable(final Callable<T> callable, final boolean transacted) throws HibernateException

Implements org.hibernate.resource.transaction.spi.IsolationDelegate.delegateCallable.

Doc from org.hibernate.resource.transaction.spi.IsolationDelegate.delegateCallable.

Invoke the given callable in isolation from current transaction.

Parameters
callable:Callable<T>

The callable to be invoked.

transacted:boolean

Should the work itself be done in a (isolated) transaction?

Returns:T

The work result

Annotations
@Override
Exceptions
HibernateException:
Indicates a problem performing the work.
delegateWorkback to summary
public <T> T delegateWork(final WorkExecutorVisitable<T> work, final boolean transacted) throws HibernateException

Implements org.hibernate.resource.transaction.spi.IsolationDelegate.delegateWork.

Doc from org.hibernate.resource.transaction.spi.IsolationDelegate.delegateWork.

Perform the given work in isolation from current transaction.

Parameters
work:WorkExecutorVisitable<T>

The work to be performed.

transacted:boolean

Should the work itself be done in a (isolated) transaction?

Returns:T

The work result

Annotations
@Override
Exceptions
HibernateException:
Indicates a problem performing the work.
doInNewTransactionback to summary
private <T> T doInNewTransaction(JtaIsolationDelegate.HibernateCallable<T> callable, TransactionManager transactionManager)
doInSuspendedTransactionback to summary
private <T> T doInSuspendedTransaction(JtaIsolationDelegate.HibernateCallable<T> callable)
doTheWorkback to summary
private <T> T doTheWork(WorkExecutorVisitable<T> work)
jdbcConnectionAccessback to summary
protected JdbcConnectionAccess jdbcConnectionAccess()
sqlExceptionHelperback to summary
protected SqlExceptionHelper sqlExceptionHelper()
org.hibernate.resource.transaction.backend.jta.internal back to summary

private Interface JtaIsolationDelegate.HibernateCallable<T>


Method Summary

Modifier and TypeMethod and Description
public T
call()

Method Detail

callback to summary
public T call() throws HibernateException