FileDocCategorySizeDatePackage
Isolater.javaAPI DocHibernate 3.2.57076Tue Jun 06 13:08:00 BST 2006org.hibernate.engine.transaction

Isolater

public class Isolater extends Object
Class which provides the isolation semantics required by an {@link IsolatedWork}. Processing comes in two flavors:
  • {@link #doIsolatedWork} : makes sure the work to be done is performed in a seperate, distinct transaction
  • {@link #doNonTransactedWork} : makes sure the work to be done is performed outside the scope of any transaction
author
Steve Ebersole

Fields Summary
private static final Log
log
Constructors Summary
Methods Summary
public static voiddoIsolatedWork(IsolatedWork work, org.hibernate.engine.SessionImplementor session)
Ensures that all processing actually performed by the given work will occur on a seperate transaction.

param
work The work to be performed.
param
session The session from which this request is originating.
throws
HibernateException


	                                   	 
	         
		boolean isJta = session.getFactory().getTransactionManager() != null;
		if ( isJta ) {
			new JtaDelegate( session ).delegateWork( work, true );
		}
		else {
			new JdbcDelegate( session ).delegateWork( work, true );
		}
	
public static voiddoNonTransactedWork(IsolatedWork work, org.hibernate.engine.SessionImplementor session)
Ensures that all processing actually performed by the given work will occur outside of a transaction.

param
work The work to be performed.
param
session The session from which this request is originating.
throws
HibernateException

		boolean isJta = session.getFactory().getTransactionManager() != null;
		if ( isJta ) {
			new JtaDelegate( session ).delegateWork( work, false );
		}
		else {
			new JdbcDelegate( session ).delegateWork( work, false );
		}