-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Spring JTA Problem
PostPosted: Thu May 20, 2010 2:11 pm 
Newbie

Joined: Thu May 20, 2010 2:06 pm
Posts: 1
Hi,
I am using Hibernate + Spring + JTA in my project. I am using JTA because my project deals with multiple databases. When I use the following:

getHibernateTemplate().save(employee);

JTA works properly in above case and in case of any exception, Transaction is rolled back.

But when I use following transaction is not rolled back.

Session ses =getHibernateTemplate().getSessionFactory().getCurrentSession();
ses.createQuery("update Employee emp set emp.empName='sonu' where emp.empId=1").executeUpdate();

Can anybody please help me in understanding the difference and also help me in knowing the solution.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.