Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization tutorials » Tutorial: Server-initiated synchronization using light weight polling

 

Lesson 3: Configure the Notifier

In this lesson, you configure a Notifier event to define how the Notifier creates push requests, and sends push notifications to devices.

♦  To create a new Notifier
  1. Connect to the consolidated database using the MobiLink Synchronization plug-in:

    1. Open Sybase Central.

    2. In the left pane, click MobiLink 11.

    3. Click Mode » Admin.

    4. Click File » Connect.

    5. Click the Identification tab.

    6. In the ODBC Data Source name field, type SIS_CarDealer_LP_DBLSN_CONDB.

    7. Click OK.

  2. In the left-pane, click the Notification folder.

  3. Click File » New » Notifier.

  4. Specify CarDealerNotifier in the Notifier field, and then click Finish.

  5. Enter the request_cursor event script.

    The request_cursor event script detects push requests. Each push request determines what information is sent, and which device should receive the information.

    1. In the right pane, select CarDealerNotifier. From the File menu, choose Properties.

    2. Click the Events tab and choose request_cursor for the event.

    3. Enter the following script for the request_cursor script:

      SELECT ml_sis_sync_state.remote_id + '.sync' FROM ml_sis_sync_state
          WHERE EXISTS (SELECT 1 FROM Dealer 
              WHERE last_modified >= ml_sis_sync_state.last_download
          )
          UNION
          SELECT poll_key FROM non_sync_request
  6. Click OK to save the Notifier event.

See also