A convenient way to configure the Listener is to store the command line options in a configuration file and access it with the @ symbol. The configuration file is a text file. For example, store the settings in mydblsn.txt and start the Listener by entering:
dblsn @mydblsn.txt |
The path to the configuration file must be fully qualified.
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 File Hiding utility (dbfhide).
You can also store command line options in an environment variable, and call it in the dblsn command line by entering @ and the environment variable name; for example, dblsn @dblsnoptions. If you have both a file name and an environment variable with the same name, the environment variable is used.
If you enter dblsn without any parameters, dblsn uses 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 the MobiLink server messages window and message log file # -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';" |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |