Connection–Handling magnus.conf Directives for NSAPI
In addition to the settings discussed above, you can edit the following directives in the
magnus.conf
file to configure 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 finish 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 Configuration File Reference
.
Note –
For the safest way to edit configuration files 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
file 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.
Understanding Threads, Processes, and Connections
Sun Java System Web Server 7.0 Update 1 Performance Tuning, Sizing, and Scaling Guide •
42
Summary of Contents for Sun Java System Web Server 7.0
Page 9: ...Figures FIGURE 2 1 Web Server Connection Handling 40 9 ...
Page 10: ...10 ...
Page 18: ...18 ...
Page 38: ...38 ...
Page 84: ...84 ...
Page 100: ...100 ...