On Nov 11, 2010, at 7:46 PM, Andrus Adamchik wrote: > > * extend the scope of the Transaction object, and add post-callbacks hook to > it. Also add a property map to transaction that would allow user apps to > attach arbitrary stuff to it. I wanted to do it some time back. Now is a good > occasion. > > * create a special callbacks context spanning either POST_<commit> or > POST_LOAD, so it would allow to look at all objects processed in a given > transaction. It will have its own callback events.
Ultimately I came up with this solution: https://issues.apache.org/jira/browse/CAY-1508 I have a local patch already, and combined with CAY-1509, I think annotated DataChannelFilters are going to be a powerful new abstraction allowing to optimize object lifecycle tracking. A few operations are not wrapped by the filter (POST_ADD, PRE_REMOVE, and POST_LOAD when called on rollback), but I think we can go pretty far by wrapping just query and commit ops. To be sure something similar to channel filters was already achievable since like 1.2 via DataChannel decoration. I know personally I haven't been comfortable with decoration, and I am still reluctant to use it in my apps, so I wanted something that won't interfere with channel/context parent/child relationships. Moreover filters are much more flexible, as they can be installed at runtime without breaking the existing channel/context structure. Andrus
