This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Spring and the fly likes Problem with @Transactional (Transaction is not getting rollbacked) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem with @Transactional (Transaction is not getting rollbacked)
 
Similar Threads
Struts Session Per Request Pattern?
Call Transactional Remote Session Bean From Spring
InternalResourceViewResolver failing JUnit test -- Spring Demo Source
@Transaction annotation in dao or service layer ?
Unable to catch the java.sql.BatchUpdateException (Spring)