Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Loading CSAPI Modules

Calendar Server loads CSAPI modules from the cal/bin/plugins directory at startup and unloads them at server shutdown. All plug-in modules must reside in this directory and have filenames that are prefaced with cs_.

The server checks ics.conf for the modules to be dynamically loaded at server startup. If the value of the preference csapi.plugin.loadall is y, the server loads all shared objects in the cal/bin/plugins directory whose names begin with the prefix cs_. Otherwise, if the value is n, various parameters exist for the various plug-ins. For more information on the preferences in ics.conf, see the Sun Java System Calendar Server 6 2005Q4 Administration Guide.

To specify the loading of a specific plug-in, csapi.plugin.loadall must be set to n. In addition, two parameters must be used: csapi.plugin.plugin name, with a value of y, and csapi.plugin.plugin, with the value being the name of the plug-in.

For example, to load only the calendar-lookup plug-in, the parameters are:

csapi.plugin.loadall = "n"
csapi.plugin.calendarlookup = "y" = "calendarlookup"

Note that the plugin name part of the parameter must match on both parameters, but that it does not have to be the same as the value of the parameter. Thus, if you wanted to create a plug-in called cs_myown_plugin, you could call the parameters csapi.plugin.anyname, and The value of must be “cs_myown_plugin”.

Calendar Server uses the NSPR function PR_LoadLibrary() to load the shared object at startup, the function PR_UnloadLibrary to unload the shared image at shutdown. Once a shared object is loaded into memory, Calendar Server uses the function PR_FindSymbol to find entry points to known API implementations.