FileDocCategorySizeDatePackage
DummyJTAStyleTransationFactory.javaAPI DocHibernate 3.2.53922Thu Jul 13 20:55:32 BST 2006org.hibernate.test.tm

DummyJTAStyleTransationFactory

public class DummyJTAStyleTransationFactory extends Object implements org.hibernate.transaction.TransactionFactory
todo: describe DummyJTAStyleTransationFactory
author
Steve Ebersole

Fields Summary
Constructors Summary
Methods Summary
public booleanareCallbacksLocalToHibernateTransactions()

		return false;
	
public voidconfigure(java.util.Properties props)

	
public org.hibernate.TransactioncreateTransaction(org.hibernate.jdbc.JDBCContext jdbcContext, Context context)

		return new DummyTransactionAdapter();
	
public org.hibernate.ConnectionReleaseModegetDefaultReleaseMode()

		return ConnectionReleaseMode.AFTER_STATEMENT;
	
public booleanisTransactionInProgress(org.hibernate.jdbc.JDBCContext jdbcContext, Context transactionContext, org.hibernate.Transaction transaction)

		try {
			return JTAHelper.isTransactionInProgress( DummyTransactionManager.INSTANCE.getCurrent() )
			       && ! JTAHelper.isMarkedForRollback( DummyTransactionManager.INSTANCE.getCurrent() );
		}
		catch( SystemException e ) {
			throw new HibernateException( e );
		}
	
public booleanisTransactionManagerRequired()

		return true;
	
public static voidsetup(org.hibernate.cfg.Configuration cfg)

		cfg.setProperty( Environment.CONNECTION_PROVIDER, DummyConnectionProvider.class.getName() );
		cfg.setProperty( Environment.TRANSACTION_MANAGER_STRATEGY, DummyTransactionManagerLookup.class.getName() );
		cfg.setProperty( Environment.TRANSACTION_STRATEGY, DummyJTAStyleTransationFactory.class.getName() );
		cfg.setProperty( Environment.FLUSH_BEFORE_COMPLETION, "true" );