Connection–Handlingmagnus.conf Directives for NSAPI

Inaddition to the settings discussed above, you can edit the following directives in the
magnus.confle to congure additional request-processing settings for NSAPI plug-ins:
KernelThreads– Determines whether NSAPI plug-ins always run on kernel-scheduled
threads(Windows only)
TerminateTimeout– Determines the maximum amount of time to wait for NSAPI plug-ins
tonish processing requests when the server is shut down
Fordetailed information about these directives, see the Sun Java System Web Server 7.0
Update1 Administrator’sC onguration FileReference.
Note– For the safest way to edit conguration les such as magnus.conf, use the wadm
commandsget-config-file and set-config-file to pull a local copy for editing and push it
backto the Web Server. For more information on these commands, see the help for these
commands.
CustomThread Pools
Bydefault, the connection queue sends requests to the default thread pool. However, you can
alsocreate your own thread pools in magnus.conf using a thread pool Init function. These
customthread pools are used for executing NSAPI Service Application Functions (SAFs), not
entirerequests.
Ifthe SAF requires the use of a custom thread pool, the current request processing thread
queuesthe request, waits until the other thread from the custom thread pool completes the SAF,
thenthe request processing thread completes the rest of the request.
Forexample, the obj.conf le contains the following:
NameTrans fn="assign-name"from="/testmod"name="testmod"pool="my-custom-pool"
...
<Object name="testmod">
ObjectType fn="force-type"type="magnus-internal/testmod"
Service method=(GET|HEAD|POST) type="magnus-internal/testmod"
fn="testmod_service"pool="my-custom-pool2"
</Object>
Inthis example, the request is processed as follows:
1. Therequest processing thread (in this example, called A1) picks up the request and executes
thesteps before the NameTrans directive.
2. Ifthe URI starts with /testmod, the A1 thread queues the request to the my-custom-pool
queue.The A1 thread waits.
UnderstandingThreads,Processes, and Connections
SunJavaSystem Web Server 7.0 Update 1 Performance Tuning,Sizing, and Scaling Guide 42