Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
8.0.4
-
None
-
None
Description
When calling a bean method annotated with @Transactional, the transaction is marked RollbackOnly if a RuntimeException is thrown from within the method.
This is not working when wrapping @Transactional into a @Stereotype and using this to mark as transactional.
Tiny sample project to demonstrate the problem will be attached - call the following URLs after deployment:
[1] http://localhost:8080/TransStereoDemo/demo/success
[2] http://localhost:8080/TransStereoDemo/demo/fail
[3] http://localhost:8080/TransStereoDemo/demo/success2
[4] http://localhost:8080/TransStereoDemo/demo/fail2
All above calls will output "COMMIT" or "ROLLBACK" depending on the transaction state.
[2] will correctly result in "ROLLBACK" (@Transactional annotated directly) while [4] gives "COMMIT" (@Stereotype containing @Transactional is used for annotation)