[infinispan-issues] [JBoss JIRA] (ISPN-3643) Allow the listener to abort an transaction

Dan Berindei (Jira) issues at jboss.org
Fri Mar 22 04:25:00 EDT 2019


    [ https://issues.jboss.org/browse/ISPN-3643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13711972#comment-13711972 ] 

Dan Berindei commented on ISPN-3643:
------------------------------------

The behaviour was already implemented, see {{ListenerExceptionTest}}.

I don't believe listeners are the best way to do validation though, because the listeners run both on the originator and on *all* the owners. In addition to doing more work, if the cache is transactional with 1PC or non-transactional, if the listener throws an exception on one of the owners will veto the change only on that owner.

> Allow the listener to abort an transaction
> ------------------------------------------
>
>                 Key: ISPN-3643
>                 URL: https://issues.jboss.org/browse/ISPN-3643
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Listeners, Transactions
>            Reporter: Mircea Markus
>            Assignee: William Burns
>            Priority: Major
>
> Two ways of doing this:
> - listener throws an exception
> - add an Event.abortTransaction()or Event.veto(false) on the listeners.
> Discussed on the mailing list:http://markmail.org/message/y6enpffq3s4vb7fs



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list