File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Problem with @Transactional (Transaction is not getting rollbacked) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem with @Transactional (Transaction is not getting rollbacked)" Watch "Problem with @Transactional (Transaction is not getting rollbacked)" New topic
Author

Problem with @Transactional (Transaction is not getting rollbacked)

upendra sharma
Greenhorn

Joined: Aug 25, 2010
Posts: 10
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.



Preparing SCJP 6.
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
You are using which version for spring and hibernate.
upendra sharma
Greenhorn

Joined: Aug 25, 2010
Posts: 10
hi. I am using spring 3.0, Struts 2 and Hibernate 3.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with @Transactional (Transaction is not getting rollbacked)