Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B4AF103BA for ; Wed, 24 Apr 2013 18:26:53 +0000 (UTC) Received: (qmail 59214 invoked by uid 500); 24 Apr 2013 18:26:53 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 59125 invoked by uid 500); 24 Apr 2013 18:26:52 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 59117 invoked by uid 99); 24 Apr 2013 18:26:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 18:26:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 24 Apr 2013 18:26:47 +0000 Received: (qmail 5127 invoked from network); 24 Apr 2013 18:28:20 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 24 Apr 2013 18:28:20 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Peer Context Synchronization From: Andrus Adamchik In-Reply-To: Date: Wed, 24 Apr 2013 14:26:27 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <523B0521-6A9B-48E2-AD1D-EAAE2F14A825@objectstyle.org> References: To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1503) X-Virus-Checked: Checked by ClamAV on apache.org Hi Lon, Context update is immediate, but asynchronous, so this likely explains = the observed behavior.=20 Andrus 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. > :) >=20 > 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. >=20 > However, there are times where this isn't happening=85and it's = intermittent. >=20 > 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). >=20 > However, occasionally=85maybe 1 in 10, the peer context doesn't get > immediately updated (although will, I believe, at a later time). >=20 > So the question is, does commitChanges immediately/synchronously push = all > changes into peer contexts? Or does it happen in another way? >=20 > Thanks for any insight. >=20 > -Lon