Sun Java System Web Server 6.1 SP7 NSAPI Programmer's Guide

load-modules

Applicable in Init-class directives.

The load-modules function loads a shared library or dynamic-link library (DLL) into the server code. Specified functions from the library can then be executed from any subsequent directives. Use this function to load new plug-ins or SAFs.

If you define your own SAFs, you get the server to load them by using the load-modules function and specifying the shared library or DLL to load.

Parameters

The following table describes parameters for the load-modules function.

Table 2–11 load-modules parameters

Parameter  

Description  

shlib

Specifies either the full path to the shared library or DLL, or a file name relative to the server configuration directory. 

funcs

Comma-separated list of the names of the functions in the shared library or DLL to be made available for use by other Init directives or by Service directives in obj.conf. The list should not contain any spaces. The dash (-) character may be used in place of the underscore (_) character in function names.

NativeThread

(Optional) Specifies which threading model to use. 

no causes the routines in the library to use user-level threading.

yes enables kernel-level threading. The default is yes.

pool

Name of a custom thread pool, as specified in thread-pool-init.

Examples


Init fn=load-modules shlib="C:/mysrvfns/corpfns.dll" 
funcs="moveit"

Init fn=load-modules shlib="/mysrvfns/corpfns.so" 
funcs="myinit,myservice"
Init fn=myinit