cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Peer Context Synchronization
Date Wed, 24 Apr 2013 18:26:27 GMT
Hi Lon,

Context update is immediate, but asynchronous, so this likely explains the observed behavior.


On Apr 24, 2013, at 2:14 PM, Lon Varscsak <> wrote:
> Hey all, I'm having some trouble with something that I _think_ should work.
> :)
> It's a very common pattern for me to create a new context, do work, save,
> and expect those changes to make it back into peer contexts that share
> object ids.
> However, there are times where this isn't happening…and it's intermittent.
> My model in this situation is pretty simple, there's EntityA with a to-many
> to EntityB.  In a peer context, I'm creating an EntityB and adding it to
> the relationship of EntityA (a local instance), and generally speaking, in
> my other peer context the matching instance of EntityA is updated and has
> the proper EntityB in it's relationship (after commitChanges).
> However, occasionally…maybe 1 in 10, the peer context doesn't get
> immediately updated (although will, I believe, at a later time).
> So the question is, does commitChanges immediately/synchronously push all
> changes into peer contexts?  Or does it happen in another way?
> Thanks for any insight.
> -Lon

View raw message