Top Description Inners Fields Constructors Methods
org.hibernate.engine.transaction

public Class Isolater

extends Object
Class Inheritance
Imports
java.sql.Connection, .SQLException, javax.transaction.Transaction, .TransactionManager, .SystemException, .NotSupportedException, org.slf4j.Logger, .LoggerFactory, org.hibernate.HibernateException, org.hibernate.engine.SessionImplementor, org.hibernate.exception.JDBCExceptionHelper, .SQLExceptionConverter

Class which provides the isolation semantics required by an IsolatedWork. Processing comes in two flavors:
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface
public static class
Isolater.JdbcDelegate

An isolation delegate for JDBC-based transactions.

public static class
Isolater.JtaDelegate

An isolation delegate for JTA-based transactions.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
doIsolatedWork(IsolatedWork
The work to be performed.
work
,
SessionImplementor
The session from which this request is originating.
session
)

Ensures that all processing actually performed by the given work will occur on a seperate transaction.

public static void
doNonTransactedWork(IsolatedWork
The work to be performed.
work
,
SessionImplementor
The session from which this request is originating.
session
)

Ensures that all processing actually performed by the given work will occur outside of a transaction.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log

Constructor Detail

Isolaterback to summary
public Isolater()

Method Detail

doIsolatedWorkback to summary
public static void doIsolatedWork(IsolatedWork work, SessionImplementor session) throws HibernateException

Ensures that all processing actually performed by the given work will occur on a seperate transaction.

Parameters
work:IsolatedWork

The work to be performed.

session:SessionImplementor

The session from which this request is originating.

doNonTransactedWorkback to summary
public static void doNonTransactedWork(IsolatedWork work, SessionImplementor session) throws HibernateException

Ensures that all processing actually performed by the given work will occur outside of a transaction.

Parameters
work:IsolatedWork

The work to be performed.

session:SessionImplementor

The session from which this request is originating.

org.hibernate.engine.transaction back to summary

private Interface Isolater.Delegate

Known Direct Implementers
org.hibernate.engine.transaction.Isolater.JtaDelegate, org.hibernate.engine.transaction.Isolater.JdbcDelegate

Method Summary

Modifier and TypeMethod and Description
public void
delegateWork(IsolatedWork work, boolean transacted)

Method Detail

delegateWorkback to summary
public void delegateWork(IsolatedWork work, boolean transacted) throws HibernateException
org.hibernate.engine.transaction back to summary

public Class Isolater.JdbcDelegate

extends Object
implements Delegate
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.transaction.Isolater.Delegate

An isolation delegate for JDBC-based transactions. Basically just grabs a new connection and does the work on that.

Field Summary

Modifier and TypeField and Description
private final SessionImplementor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
private SQLExceptionConverter
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionback to summary
private final SessionImplementor session

Constructor Detail

JdbcDelegateback to summary
public JdbcDelegate(SessionImplementor session)

Method Detail

delegateWorkback to summary
public void delegateWork(IsolatedWork work, boolean transacted) throws HibernateException

Implements org.hibernate.engine.transaction.Isolater.Delegate.delegateWork.

sqlExceptionConverterback to summary
private SQLExceptionConverter sqlExceptionConverter()
org.hibernate.engine.transaction back to summary

public Class Isolater.JtaDelegate

extends Object
implements Delegate
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.transaction.Isolater.Delegate

An isolation delegate for JTA-based transactions. Essentially susepnds any current transaction, does the work in a new transaction, and then resumes the initial transaction (if there was one).

Field Summary

Modifier and TypeField and Description
private final SessionImplementor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
private void
private void
private void
private SQLExceptionConverter
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionback to summary
private final SessionImplementor session

Constructor Detail

JtaDelegateback to summary
public JtaDelegate(SessionImplementor session)

Method Detail

delegateWorkback to summary
public void delegateWork(IsolatedWork work, boolean transacted) throws HibernateException

Implements org.hibernate.engine.transaction.Isolater.Delegate.delegateWork.

doTheWorkback to summary
private void doTheWork(IsolatedWork work)
doTheWorkInNewTransactionback to summary
private void doTheWorkInNewTransaction(IsolatedWork work, TransactionManager transactionManager)
doTheWorkInNoTransactionback to summary
private void doTheWorkInNoTransaction(IsolatedWork work)
sqlExceptionConverterback to summary
private SQLExceptionConverter sqlExceptionConverter()