hibernate - spring transaction commits but data not inserted in db -
I am facing a problem in my application which uses Spring 3.1 and Android. 3.6 Hibernate
I have two service classes: ServiceA & amp; ServiceB ServiceB.dbInsert () method has 'REQUIRES_NEW' tx attribute and Service A is 'required' at the class level.
1. When I perform normally, the data entered by ServiceB.dbInsert () is given to DB - it's OK. 2. When I fail the TX in ServiceB.dbInsert () to debug mode in Eclipse, then Tx is returned - it's OK.
3. In the above case, if I retry the operation ServiceB.dbInsert () Since the failure of the service, the data entered by ServiceB.dbInsert () is not committed. - This is a problem.
Spring transaction advice is applied in all the above cases and the doCommit () of spring is called (except 2 where rollback occurs).
It is unclear why the problem 3 is going on. No exceptions have been thrown. Debug mode is well checked in.
Comments
Post a Comment