1 package org.hibernate.transaction; 3 4 import java.util.Properties ; 5 6 import org.hibernate.ConnectionReleaseMode; 7 import org.hibernate.Transaction; 8 import org.hibernate.HibernateException; 9 import org.hibernate.jdbc.JDBCContext; 10 11 16 public final class JDBCTransactionFactory implements TransactionFactory { 17 18 public ConnectionReleaseMode getDefaultReleaseMode() { 19 return ConnectionReleaseMode.AFTER_TRANSACTION; 20 } 21 22 public Transaction beginTransaction(JDBCContext jdbcContext, Context transactionContext) throws HibernateException { 23 JDBCTransaction tx = new JDBCTransaction( jdbcContext, transactionContext ); 24 tx.begin(); 25 return tx; 26 } 27 28 public void configure(Properties props) throws HibernateException {} 29 30 } 31 | Popular Tags |