@Transactional in Spring+Hibernate

后端 未结 3 1541
轮回少年
轮回少年 2021-01-02 11:49

I an using Spring 3.1 + Hibernate 4.x in my web application. In my DAO, i am saving User type object as following

sessionFactory.getCurren         


        
3条回答
  •  执笔经年
    2021-01-02 12:28

    i think you are using Hibernate 4.x then why you are using hibernate 3 transaction manager in application context file?

    
        
            
        
    
    

    i think it should be

    
        
            
        
    
    

    just try to use hibernate 4 transaction manager along with @Transactional attribute it should work.

提交回复
热议问题