[
https://issues.apache.org/jira/browse/OWB-1111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112986#comment-15112986
]
Mark Struberg commented on OWB-1111:
------------------------------------
Romain, can you plz review my commit?
> 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.2.8, 1.6.2
> 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)