1 16 17 package org.springframework.orm.hibernate3; 18 19 import java.util.Properties ; 20 21 import javax.transaction.TransactionManager ; 22 23 import org.hibernate.transaction.TransactionManagerLookup; 24 25 45 public class LocalTransactionManagerLookup implements TransactionManagerLookup { 46 47 private final TransactionManager transactionManager; 48 49 50 public LocalTransactionManagerLookup() { 51 TransactionManager tm = LocalSessionFactoryBean.getConfigTimeTransactionManager(); 52 if (tm == null) { 54 throw new IllegalStateException ("No JTA TransactionManager found - " + 55 "jtaTransactionManager property must be set on LocalSessionFactoryBean"); 56 } 57 this.transactionManager = tm; 58 } 59 60 public TransactionManager getTransactionManager(Properties props) { 61 return transactionManager; 62 } 63 64 public String getUserTransactionName() { 65 return null; 66 } 67 68 } 69 | Popular Tags |