[jbossts-issues] [JBoss JIRA] (JBTM-2881) STM InvocationHandler swallows application exceptions

Michael Musgrove (JIRA) issues at jboss.org
Tue Apr 11 12:32:00 EDT 2017


Michael Musgrove created JBTM-2881:
--------------------------------------

             Summary: 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.next


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.




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbossts-issues mailing list