This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Will HibernateTransactionManager rollback jdbc transactions?

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ... Will HibernateTransactionManager rollback hibernate operations only or will it rollback any operation(like a jdbc insert) on the db.

If it does not rollback jdbc transactions then please let me know as to what could be done to rollback a combination(hibernate/jdbc) of db transactions.

Below is the code that i am using.

<beans xmlns="";

<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<prop key="save">PROPAGATION_REQUIRED</prop> ------- adding transaction interceptor on all the save methods.

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="dataSource" ref="dataSource" />
<property name="sessionFactory" ref="sessionFactory" />

public void save(Product product){
jdbc call to insert into a table; }
public class ProductQohDaoImpl extends HibernateDaoSupport implements ProductQohDao{

public void save(ProductQoh productQoh){
int x = 1/0; ---deliberately throwing an exception to rollback the transactions

Thank you for your help.
You showed up just in time for the waffles! And this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic