Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-1111

firing a during-transaction event fails if the tx is already rolled back or not active

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.8, 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: Java EE Integration
    • Labels:
      None

      Description

      Consider you have an observer method like

      public void clearCacheAfterTx(@Observes(during=TransactionPhase.AFTER_COMPLETION) ClearAfterTx payload) {...}
      

      and you fire the event

      clearCacheEvent.fire(new ClearCacheEvent());
      

      In this case firing the event currently blows up if the underlying transaction is already closed or rolled back. This happens because the transaction spec states that you cannot register a tx Synchronisation in certain states:
      https://docs.oracle.com/javaee/6/api/javax/transaction/Transaction.html#registerSynchronization%28javax.transaction.Synchronization%29

        Attachments

          Activity

            People

            • Assignee:
              struberg Mark Struberg
              Reporter:
              struberg Mark Struberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: