cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Lewis (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CAY-1190) Optimistic locking is incompatible with "Use Shared Cache"
Date Sat, 17 Sep 2011 11:37:09 GMT

    [ https://issues.apache.org/jira/browse/CAY-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104048#comment-13104048
] 

Bryan Lewis edited comment on CAY-1190 at 9/17/11 11:36 AM:
------------------------------------------------------------

We stumbled across this issue today.  We have several apps using Cayenne 3.0.  With shared
cache enabled, optimistic locking wasn't working.  It doesn't seem to affect explicitly cached
queries -- those with query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE).  The choice
of cache used when creating the DataContext is what matters.
In hindsight this makes sense -- if all DataContexts are sharing the same cache -- the attribute
used for locking will always have the current value and optimistic locking can't work that
way.  Well, optimistic locking will still work that way if an object is modified by some other
process outside the VM.

      was (Author: bryanlewis):
    We stumbled across this issue today.  We have several apps using Cayenne 3.0 and 3.1.
 With shared cache enabled, optimistic locking wasn't working.  It doesn';t seem to affect
explicitly cached queries -- those with query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE).
 The choice of cache used when creating the DataContext is what matters.
  
> Optimistic locking is incompatible with "Use Shared Cache"
> ----------------------------------------------------------
>
>                 Key: CAY-1190
>                 URL: https://issues.apache.org/jira/browse/CAY-1190
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.0M5
>            Reporter: √ėyvind Harboe
>
> If I enable "Use Shared Cache" optimistic locking fails.
> I'm not sure if shared cache always was incompatible with shared locking by design or
if it is even possible to get this to work, but the effect is regardless that you won't get
optimistic locking exceptions unless you disable "Use Shared Cache".

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

       

Mime
View raw message