[jbossts-issues] [JBoss JIRA] (JBTM-1711) @CompensationScoped fails in CompensationHandler et al

Paul Robinson (JIRA) jira-events at lists.jboss.org
Fri Aug 2 12:11:26 EDT 2013


     [ https://issues.jboss.org/browse/JBTM-1711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Robinson updated JBTM-1711:
--------------------------------

        Status: Resolved  (was: Pull Request Sent)
    Resolution: Done

    
> @CompensationScoped fails in CompensationHandler et al
> ------------------------------------------------------
>
>                 Key: JBTM-1711
>                 URL: https://issues.jboss.org/browse/JBTM-1711
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: TXFramework
>            Reporter: Paul Robinson
>            Assignee: Paul Robinson
>            Priority: Critical
>             Fix For: 5.0.0.M4
>
>   Original Estimate: 2 days
>          Time Spent: 1 day
>  Remaining Estimate: 0 minutes
>
> Beans annotated with @CompensationScoped are injected correctly in the application. However, the scope fails to be created for CompensationHandler, ConfirmationHandler and TransactionLoggedHandler implementations. This is because they are invoked by XTS, not the application and thus Weld is not active on the thread.
> The solution is to create the instance of the handlers using the BeanManager (this ensures Weld is active) and then set the ThreadContextClassLoader to the same as the one used by the application. This ensures that the application's Weld context is used when the handler is invoked.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list