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

Init SAFs

This section the Init SAFs that can be specified in magnus.conf in Sun Java System Web Server 6.1. For information about the other, non-SAF directives in magnus.conf, see the Sun Java System Web Server 6.1 SP6 Administrator’s Configuration File Reference.

The Init directives initialize the server (for example they load and initialize additional modules and plug-ins, and initialize log files).

The Init directives are SAFs, like obj.conf directives, and have SAF syntax rather than the simpler variable value syntax of other magnus.conf directives.

They are located in magnus.conf because, like other magnus.conf directives, they are executed only once at server startup.

Each Init directive has an optional LateInit parameter. For the UNIX platform, if LateInit is set to yes, the function is executed by the child process after it is forked from the parent. If LateInit is set to no or is not provided, the function is executed by the parent process before the fork. When the server is started up by user root but runs as another user, any activities that must be performed as the user root (such as writing to a root-owned file) must be done before the fork. Functions that create threads, with the exception of thread-pool-init, should execute after the fork (that is, the relevant Init directive should have LateInit=yes set).

For all platforms, any function that requires access to a fully parsed configuration should have LateInit=yes set on its Init directive.

Upon failure, Init-class functions return REQ_ABORTED. The server logs the error according to the instructions in the Error directives in obj.conf, and terminates. Any other result code is considered a success.


Init functions have the following syntax:

Init fn=function param1="value1" ...paramN="valueN"

Directives have the following syntax:

directive value

The following Init-class functions and their parameters are described in detail in this chapter: