This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with @Transactional (Transaction is not getting rollbacked)

 
upendra sharma
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been using Transaction managment using spring. When i use Propagation.MANDATORY then it gives the following exception:


I have three layers in my application, Action , Service and Dao Layer. I have generated the Arithmetic Exception in the Service Layer but even after using Transactional annotation , the entries in the database are not getting rollbacked. Below is the method in which exception is generated. This method belongs to service layer. The above exception can be removed if i use @Transactional in the action class then it generates the ArithmeticException but still the entries have been done in the database table. Rollback is not done. BOException and DAOException are user defined exception. Please help.

 
Miku Ranjan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You are using which version for spring and hibernate.
 
upendra sharma
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. I am using spring 3.0, Struts 2 and Hibernate 3.0.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic