STM InvocationHandler swallows application exceptions
-----------------------------------------------------
Key: JBTM-2881
URL:
https://issues.jboss.org/browse/JBTM-2881
Project: JBoss Transaction Manager
Issue Type: Bug
Components: STM
Affects Versions: 5.5.6.Final
Reporter: Michael Musgrove
Assignee: Michael Musgrove
Fix For: 5.6.0.Final
The STM implementation intercepts calls on transactional objects (ones that implement
interfaces marked with the @Transactional annotation). If the application object throws a
business exception it is wrapped in an java.lang.reflect.InvocationTargetException and
this is raised. Application code is written to anticipate business exceptions but not
java.lang.reflect.InvocationTargetException.
The fix is throw the wrapped business exception instead.