cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Savva Kolbachev (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-2028) Wrap DataChannelFilter calls in the main transaction
Date Thu, 22 Oct 2015 09:35:27 GMT

     [ https://issues.apache.org/jira/browse/CAY-2028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Savva Kolbachev closed CAY-2028.
--------------------------------
       Resolution: Done
    Fix Version/s: 4.0.M3

> Wrap DataChannelFilter calls in the main transaction
> ----------------------------------------------------
>
>                 Key: CAY-2028
>                 URL: https://issues.apache.org/jira/browse/CAY-2028
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Savva Kolbachev
>             Fix For: 4.0.M3
>
>
> Currently select and update operations stack is structured roughly as follows:
> {noformat}
> --> filter1 enter
> ---> filter2 enter
> ----> ...
> -----> tx start
> ------> run operation
> -----> tx end
> ----> ...
> ---> filter2 exit
> --> filter1 exit
> {noformat}
> I.e. all filters are outside of the transaction (though I guess a filter can preemptively
start a tx on its own). Very often we'd like to invert that as follows:
> {noformat}
> -> tx start
> --> filter1 enter
> ---> filter2 enter
> ----> ...
> -----> run operation
> ----> ...
> ---> filter2 exit
> --> filter1 exit
> -> tx exit
> {noformat}
> or maybe mix pre- and post-tx filters:
> {noformat}
> -> filter1 enter
> --> tx start
> ---> filter2 enter
> ----> ...
> -----> run operation
> ----> ...
> ---> filter2 exit
> --> tx exit
> -> filter1 exit
> {noformat}
> So I guess a way to control this behavior is by moving TX code into its own filter, and
registering it by default. We will also need a change in DI API to allow callers to control
the order of DI list items insertion, so that custom filters can be inserted either before
or after a given filter. E.g.:
> {noformat}
> ListBuilder.add(label, object).after(label1);
> ListBuilder.add(label, object).before(label2);
> {noformat}



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

Mime
View raw message