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 29FCF1149B for ; Tue, 19 Aug 2014 06:31:37 +0000 (UTC) Received: (qmail 14252 invoked by uid 500); 19 Aug 2014 06:31:37 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 14227 invoked by uid 500); 19 Aug 2014 06:31:37 -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 14212 invoked by uid 99); 19 Aug 2014 06:31:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 06:31:36 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [196.25.240.215] (HELO rrba-ip-smtp-3-5.saix.net) (196.25.240.215) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 06:31:31 +0000 Received: from IV5 (ti-224-5-203.telkomadsl.co.za [105.224.5.203]) by rrba-ip-smtp-3-5.saix.net (Postfix) with SMTP id 58B511C51 for ; Tue, 19 Aug 2014 08:31:01 +0200 (SAST) Message-ID: <5CB58D8C715D4DCE978BC8BB78E676B0@IV5> From: To: References: <0A1BFFDE8DA046A681D36899E5623577@IV5> <80AC63FE-FD5B-46F5-AFC5-8B32E276CCB0@objectstyle.org> In-Reply-To: Subject: Re: Remote Change Notifications Date: Tue, 19 Aug 2014 08:31:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the pointers Andrus. Jurgen -----Original Message----- From: Andrus Adamchik Sent: Monday, August 18, 2014 10:18 PM To: user@cayenne.apache.org Subject: Re: Remote Change Notifications It�s been a while since I used it, so I may have the details wrong, but.. DataContext fires an event whenever it merges snapshot changes coming from its parent. The original cause of the event may be a peer context commit in the same VM or in a different VM. It works the same.. So you might do this: context.getEventManager().addListener( myListener, �someMethod�, GraphEvent.class, DataChannel.GRAPH_CHANGED_SUBJECT, context); �someMethod� of your listener must take GraphEvent argument. E.g.: public void someMethod(GraphEvent e) { /* update UI */ } Andrus On Aug 18, 2014, at 8:11 PM, dollj@xsinet.co.za wrote: > Thanks Andrus > > Say now I want to update my GUI when a change occurs, how do I know that > an object has been updated ? > > regards > Jurgen > > > -----Original Message----- From: Andrus Adamchik > Sent: Monday, August 18, 2014 1:52 PM > To: user@cayenne.apache.org > Subject: Re: Remote Change Notifications > > When you enable remote notifications, Cayenne send and listens to events > itself. The are object commit events to be sure, containing change deltas. > When an event is received, it is processed by the DataDomain, with the > result being that all its contexts update their copies of objects from > the event data. > > Andrus > > > On Aug 18, 2014, at 10:50 AM, dollj@xsinet.co.za wrote: >> Hi All >> >> If you have �Remote Change Notifications� enabled (using JavaGroups, JMS, >> etc.), how does Cayenne let you know when a change has been received ? >> Or how does one listen for these changes / notifications ? >> >> Thanks, regards >> Jurgen > >