Mark Struberg created OWB-1111:
----------------------------------

             Summary: firing a during-transaction event fails if the tx is 
already rolled back or not active
                 Key: OWB-1111
                 URL: https://issues.apache.org/jira/browse/OWB-1111
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Java EE Integration
    Affects Versions: 1.6.2, 1.2.8
            Reporter: Mark Struberg
            Assignee: Mark Struberg
             Fix For: 1.6.3


Consider you have an observer method like

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

and you fire the event
{code}
clearCacheEvent.fire(new ClearCacheEvent());
{code}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to