org.hibernate.engine

Class TransactionHelper

Known Direct Subclasses:
MultipleHiLoPerTableGenerator, TableGenerator, TableGenerator, TableStructure

public abstract class TransactionHelper
extends java.lang.Object

Allows work to be done outside the current transaction, by suspending it, and performing work in a new transaction
Author:
Emmanuel Bernard

Method Summary

protected abstract Serializable
doWorkInCurrentTransaction(Connection conn, String sql)
The work to be done
Serializable
doWorkInNewTransaction(SessionImplementor session)
Suspend the current transaction and perform work in a new transaction

Method Details

doWorkInCurrentTransaction

protected abstract Serializable doWorkInCurrentTransaction(Connection conn,
                                                           String sql)
            throws SQLException
The work to be done

doWorkInNewTransaction

public Serializable doWorkInNewTransaction(SessionImplementor session)
            throws HibernateException
Suspend the current transaction and perform work in a new transaction