Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-705

BEFORE_COMPLETION Transactional observer is notified for transaction which is marked for rollback

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 2.0 .Final
    • Fix Version/s: 2.1
    • Component/s: Events
    • Labels:
      None

      Description

      In 10.4.5. Transactional observer methods CDI spec states:

      If the transaction is in progress, but javax.transaction.Synchronization callback cannot be
      registered due to the transaction being already marked for rollback or in state where
      javax.transaction.Synchronization callbacks cannot be registered, the before completion, after completion and after failure observer methods are notified at the same time as other observers, but after_success observer methods get skipped.

      This doesn't conform to JTA spec, which says in 3.3.2 Transaction Synchronization:

      The Synchronization.beforeCompletion method is called prior to the
      start of the two-phase transaction commit process. This call is executed with
      the transaction context of the transaction that is being committed.

      So the before_completion transactional observer shouldn't be notified for transaction marked for rollback.
      The method Synchronization.beforeCompletion is actually not called at WildFly and GlassFish app servers for transaction which is marked for rollback.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tremes1@redhat.com Tomas Remes
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: