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