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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.8, 1.6.2
    • 1.6.3
    • Java EE Integration
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: