cache synchronization

From: Claudio Rosati (claudio.rosat..csys.it)
Date: Wed Dec 14 2005 - 06:45:02 EST

  • Next message: Lothar Krenzien: "bulk update"

    HI all,

    I'm using Cayenne (1.1.3) with jGroups. This is the code I'm using to inform
    my user (a flashing message in the application's status bar) of a
    modification occurred:

    dataContext.setDelegate(
      new DataContextDelegate() {
        public void finishedMergeChanges ( DataObject object ) {
          ... // Show a flashing message in the status bar.
        }
        public void finishedProcessDelete ( DataObject object ) {
          ; // Nothing to do.
        }
        public boolean shouldMergeChanges ( DataObject object, DataRow
    snapshotInStore ) {
          return true;
        }
        public boolean shouldProcessDelete ( DataObject object ) {
          return true;
        }
        public GenericSelectQuery willPerformSelect ( DataContext context,
    GenericSelectQuery query ) {
          return query;
        }
      }
    );

    The problem is that finishedMergeChanges is called not only when someone in
    the net changes the object viewed by my user, but even when my user does
    some modification on the object graph.

    There is a way to understand if the call was made locally (in the same V.M.
    where the application is running) or elsewhere (i.e. was caused by cache
    synchronization triggered by jgroups).?

    Thanks in advance

    Claudio

    ------------------------------------
    Advanced Computer Systems S.p.A.
    Claudio Rosati
    Project Manager
    claudio.rosat..csys.it
    via Della Bufalotta 378
    00139 Roma, RM
    Italy
    tel: +39 06 8709 0516
    fax: +39 06 8720 1502
    ------------------------------------



    This archive was generated by hypermail 2.0.0 : Wed Dec 14 2005 - 06:45:06 EST