You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org> on 2011/08/02 09:46:27 UTC

[jira] [Closed] (CAY-1594) DI extension point: turning on/off cross-ObjectContext synchronization

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

Dzmitry Kazimirchyk closed CAY-1594.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M3
         Assignee: Dzmitry Kazimirchyk

Added injectable ObjectStoreFactory which makes decision on turning sync on or off basing on 'org.apache.cayenne.sync_contexts' property which must be defined in RuntimeProperties with 'true' or 'false' value ('true' is chosen by default).

> DI extension point: turning on/off cross-ObjectContext synchronization
> ----------------------------------------------------------------------
>
>                 Key: CAY-1594
>                 URL: https://issues.apache.org/jira/browse/CAY-1594
>             Project: Cayenne
>          Issue Type: Task
>    Affects Versions: 3.1M2
>            Reporter: Andrus Adamchik
>            Assignee: Dzmitry Kazimirchyk
>             Fix For: 3.1M3
>
>
> This is a new DI extension point - a strategy that defines whether changes from one ObjectContext are propagated to other ObjectContexts (in the same VM, or cross-VM, it should work the same). Similar to CAY-1586 (a strategy for retaining objects in the ObjectStore) this can be a single strategy class that uses a property that defines whether synchronization is to occur. The default is "true". 
> Some docs on synchronization is provided here: http://cayenne.apache.org/doc30/turning-off-context-synchronization.html
> Turning off syncing may have a number of benefits:
> 1. If the app is running on the cluster, and remote synchronization is turned off, inconsistency is introduced - contexts local to a committing context get the changes, remote - don't.
> 2. Better performance - synchronization (even though run asynchronously) , has O(N) performance in respect to the number of contexts in the system. This is not scalable. 
> 3. Optimistic locking may actually become usable.  Currently optimistic locking in a typical webapp may not detect changes to objects due to background synchronization. While I haven't tried it with syncing being off, my assertion is that it will become more deterministic.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira