Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-1711

@CompensationScoped fails in CompensationHandler et al

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                paul.robinson Paul Robinson
                Reporter:
                paul.robinson Paul Robinson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day Time Not Required
                  1d