org.hibernate.transaction

Class JDBCTransaction

Implemented Interfaces:
Transaction

public class JDBCTransaction
extends java.lang.Object
implements Transaction

Transaction implementation based on transaction management through a JDBC java.sql.Connection.

This the Hibernate's default transaction strategy.

Authors:
Anton van Straaten
Gavin King

Constructor Summary

JDBCTransaction(JDBCContext jdbcContext, TransactionFactory.Context transactionContext)

Method Summary

void
begin()
void
commit()
boolean
isActive()
void
registerSynchronization(Synchronization sync)
void
rollback()
void
setTimeout(int seconds)
boolean
wasCommitted()
boolean
wasRolledBack()

Constructor Details

JDBCTransaction

public JDBCTransaction(JDBCContext jdbcContext,
                       TransactionFactory.Context transactionContext)

Method Details

begin

public void begin()
            throws HibernateException
Specified by:
begin in interface Transaction

commit

public void commit()
            throws HibernateException
Specified by:
commit in interface Transaction

isActive

public boolean isActive()
Specified by:
isActive in interface Transaction

registerSynchronization

public void registerSynchronization(Synchronization sync)
            throws HibernateException
Specified by:
registerSynchronization in interface Transaction

rollback

public void rollback()
            throws HibernateException
Specified by:
rollback in interface Transaction

setTimeout

public void setTimeout(int seconds)
Specified by:
setTimeout in interface Transaction

wasCommitted

public boolean wasCommitted()
Specified by:
wasCommitted in interface Transaction

wasRolledBack

public boolean wasRolledBack()
Specified by:
wasRolledBack in interface Transaction