Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
You can define start classes that are loaded automatically when the server is started. The purpose of this feature is to allow you to write .NET code that executes at the time the MobiLink server starts the CLR—before the first synchronization. This means you can create connections or cache data before the first user synchronization request in the server instance.
You do this with the MLStartClasses option of the mlsrv16 -sl dnet option. For example, the following is part of an mlsrv16 command line. It causes mycl1 and mycl2 to be loaded as start classes.
Classes are loaded in the order in which they are listed. If the same class is listed more than once, more than one instance is created.
All start classes must be public and must have a public constructor that either accepts no arguments or accepts one argument of type MobiLink.Script.ServerContext.
The names of loaded start classes are output to the MobiLink log with the message "Loaded .NET start class: classname".
For more information about .NET CLR, see -sl dnet mlsrv16 option.
To see the start classes that are constructed at server start time, see ServerContext.GetStartClassInstances method [MobiLink server .NET].
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|