code: public BaseMessageFilter linkRemoteSession(Object remoteSession)
      {
          if (remoteSession instanceof RemoteSession)
              if (remoteSession instanceof RecordOwner)   // Always
                  if (m_source == null)
          {
              String strTableName = (String)this.getProperties().get(TABLE_NAME);
              Record record = (Record)((RecordOwner)remoteSession).getRecord(strTableName);
              if (record != null)
              {
                  record.addListener(new GridSyncRecordMessageFilterHandler(this, true));
  //                m_source = record;
                  if (record.getTable() instanceof GridTable) // Always
                      if ((record.getEditMode() == DBConstants.EDIT_CURRENT) || (record.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
                          Utility.getLogger().severe("Inconsistent cache - You must add the remote session filter before you do your first read");
                  m_source = remoteSession;   // This will give the remotesession a chance to change the message before being sent
              }
          }
          return this;    // No change to the filter.
      }
docs: Link this filter to this remote session.
  This is ONLY used in the server (remote) version of a filter.
  Override this to finish setting up the filter (such as behavior to adjust this filter).
  In this case, the source cannot be passed to the remote session because it is the
  record, so the record must be re-linked to this (remote) session.