MobiLink Server-Initiated Synchronization User's Guide
Setting Up Server-Initiated Synchronization
A convenient way to configure the Listener is to store the command line options in a text file and access it with the @ symbol. For example, store the settings in mydblsn.txt and start the Listener by typing
dblsn @mydblsn.txt
The path to the parameters file must be fully qualified.
For more information about configuration files, see Using configuration files.
If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file.
See Hiding the contents of files using the dbfhide command-line utility.
You can also store command line options in an environment variable, and call it in the dblsn command line by typing @ and the environment variable name; for example, dblsn @dblsnoptions. If you have both a filename and an environment variable with the same name, the environment variable is used.
If you type dblsn without any parameters, dblsn will use dblsn.txt as the default argument file. This feature is particularly useful for CE devices.
Following is a sample parameters file.
#---- SIS_SimpleListener\dblsn.txt -------------------------------------------- # # This is the default argument file for dblsn.exe # #------------------------------------------------------------------------------ # Device name # -e device1 #------------------------------------------------------------------------------ # MobiLink connection parameters # -x host=localhost
#------------------------------------------------------------------------------ # Verbosity level 2 # -v2 #------------------------------------------------------------------------------ # Show notification messages in console and log # -m #------------------------------------------------------------------------------ # Polling interval of 1 seconds # -i 1
#------------------------------------------------------------------------------
# Truncate, then write output to dblsn.log
#
-ot dblsn.log
#------------------------------------------------------------------------------
# First message handler
# - No filter, so it applies to all messages
# - Try to send the message to the beeper utility
# - If that fails, start the beeper utility with the message
# - Message handling continues with the next handler
#
-l "action='socket port=12345;
sendText=$sender:$message;
recvText=beeperAck;
timeout=5';
altaction='start java.exe Beeper 12345 $sender:$message';
continue=yes;"
#------------------------------------------------------------------------------
# Second message handler
# - Only applies to messages with subject equals 'shutdown'
# - The action is to send "shutdown" to the beeper utility
# - Message handling continues with the next handler
#
-l "subject='shutdown';
action='socket port=12345;
sendText=shutdown;
recvText=beeperAck;
timeout=5';
continue=yes;"
#------------------------------------------------------------------------------
# Third handler
# - Only applies to messages with subject equals 'shutdown'
# - The action is to shut down the MobiLink Listener
#
-l "subject='shutdown';
action='DBLSN FULL SHUTDOWN';"SQL Anywhere Studio 9.0.2
Copyright © 1989–2004 Sybase, Inc. Portions copyright © 2001–2004 iAnywhere Solutions, Inc. All rights reserved.