Connection–Handling magnus.conf Directives for NSAPI
In addition to the settings discussed above, you can edit the following directives in the
magnus.conf le to congure 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
For detailed information about these directives, see the Sun Java System Web Server 7.0
Update 1 Administrator’s Conguration File Reference.
Note – For the safest way to edit conguration les such as magnus.conf, use the wadm
commands get-config-file and set-config-file to pull a local copy for editing and push it
back to the Web Server. For more information on these commands, see the help for these
commands.
Custom Thread Pools
By default, the connection queue sends requests to the default thread pool. However, you can
also create your own thread pools in magnus.conf using a thread pool Init function. These
custom thread pools are used for executing NSAPI Service Application Functions (SAFs), not
entire requests.
If the SAF requires the use of a custom thread pool, the current request processing thread
queues the request, waits until the other thread from the custom thread pool completes the SAF,
then the request processing thread completes the rest of the request.
For example, 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>
In this example, the request is processed as follows:
1. The request processing thread (in this example, called A1) picks up the request and executes
the steps before the NameTrans directive.
2. If the URI starts with /testmod, the A1 thread queues the request to the my-custom-pool
queue. The A1 thread waits.
UnderstandingThreads,Processes,andConnections
SunJavaSystemWebServer7.0Update1 PerformanceTuning,Sizing,and ScalingGuide •42