cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-2028) Wrap DataChannelFilter calls in the main transaction
Date Tue, 22 Sep 2015 19:04:05 GMT
Andrus Adamchik created CAY-2028:
------------------------------------

             Summary: 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: Andrus Adamchik


Currently select and update operations stack is structured roughly as follows:

--> filter1 enter
---> filter2 enter
----> ...
-----> tx start
------> run operation
-----> tx end
----> ...
---> filter2 exit
--> filter1 exit

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:

-> tx start
--> filter1 enter
---> filter2 enter
----> ...
-----> run operation
----> ...
---> filter2 exit
--> filter1 exit
-> tx exit

or maybe mix pre- and post-tx filters:

-> filter1 enter
--> tx start
---> filter2 enter
----> ...
-----> run operation
----> ...
---> filter2 exit
--> tx exit
-> filter1 exit

So I guess a way to control this behavior is by moving TX code into its own filter and allowing
to the order of DI list item insertion, so that the filter authors can define where the filter
goes. E.g.:

ListBuilder.add(label, object).after(label1);
ListBuilder.add(label, object).before(label2);





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

Mime
View raw message