I am using spring declarative transaction by using annotation.
When am forcefully calling the Exception on saveStock() ,,, the rollback is not working . Here are my code snippet :
In the PersonDAO class
My PersonDao class is somthing like this :
The Stock and Person data are getting saved in the DB.
Here is the output :
Any pointer on this would be appreciable..
posted 4 years ago
Solved the problem
I was making few mistakes ..
1) Need to call saveStock() and savePerson() from different service class .
2)I was creating the target object by spring's JDK dynamic proxies ( implemented by its interfaces) , changed that to CGLIB to create the proxy for that target object . By