How to use Atomikos Transaction Essentials with Hibernate >= 4.3

前端 未结 5 481
悲&欢浪女
悲&欢浪女 2020-12-09 05:54

I switched from Hibernate 4.2 to Hibernate 4.3 and my project is not working any more. I\'m getting an

HibernateException: Unable to locate current JT

5条回答
  •  孤城傲影
    2020-12-09 06:14

    Can you try setting the jtaTransactionManager property of org.springframework.orm.hibernate4.LocalSessionFactoryBean to Spring's JtaTransactionManager? I have similar problem but solved by this. By the way, the HibernateTemplate is back on Spring 4.0.1. Although it's not recommended, but I like to use it. It helped take care of a lot of things. (I am using Spring 4.0.5 + Hibernate 4.3.5 + Atomikos 3.9.3)

    
       
    
    
    
       
    
    
    
       
       
       
    
    
    
        
        
        
            
                org.hibernate.dialect.SQLServerDialect
                org.hibernate.cache.ehcache.EhCacheRegionFactory
                false
                org.hibernate.transaction.CMTTransactionFactory          
                true 
                true
                false
                true
            
        
        
    
    

提交回复
热议问题