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

SQL Anywhere 11.0.1 » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization tutorials » Tutorial: Server-initiated synchronization using gateways


Lesson 8: Configure the Listener

The Listener runs on remote devices. It receives messages from the Notifier and processes them into actions. For example, the Listener starts dbmlsync if it receives the message sync when the following dblsn option is specified:

-l "subject=sync;action='run dbmlsync.exe...'

A convenient way to configure the Listener is to store command line options in a text file. For example, if you store the settings in mydblsn.txt, you can start the Listener by entering:

dblsn @mydblsn.txt

Alternatively, if you type dblsn without any parameters, dblsn uses dblsn.txt as the default argument file.

To create and start the MobiLink Listener
  1. Create a text file mydblsn.txt with the following contents.

    # Verbosity level
    # Show notification messages in console and log
    # Polling interval, in seconds
    -I 3
    # Truncate, then write output to dblsn.log
    -ot dblsn.log
    # MobiLink address and connect parameter for dblsn
    -x "host=localhost"
    # Enable device tracking and specify the MobiLink user name. 
    -t+ sis_user1
    # Message handlers
    # Synchronize using dbmlsync
    -l "subject=sync;
    action='start dbmlsync.exe 
     -c eng=rem1;uid=DBA;pwd=sql
     -ot dbmlsyncOut.txt -qc';"
  2. Save the mydblsn.txt file.

  3. Start the Listener.

    1. At a command prompt, navigate to the directory of your Listener command file.

    2. Start the Listener by entering the following:

      dblsn @mydblsn.txt

    A window appears indicating the Listener is running and has uploaded device tracking information to the MobiLink server.

When tracking information is uploaded to the consolidated database, a new entry appears in the MobiLink server window. This information relays the successful initial communication between the Listener and the MobiLink server.

See also