Each service can take advantage of the pooling capabilities
to handle incoming invocation requests. Using a service pool ensures
that service instances are invoked by a single thread at a time
and are reused across invocation requests, which may result in improved
performance. You can also use pooling to specify the Maximum Asynchronous
Service Instances option, which allows services to limit the number
of requests handled in parallel.
Enable poolingIn Administration Console, click Services >
Applications and Services > Service Management.
On the Service Management page, click the service to configure.
Click the Pooling tab.
In the Request Processing Strategy list, select Pooled Instances
for All Requests.
In the Initial Service Instance Pool Size box, enter the
initial size of the pool. When the service is deployed, this number
is used to determine the number of service implementation instances
that are created and allocated to the free pool, awaiting invocation
requests. This enables the service container to respond immediately
to invocation requests without having to first initialize a service
instance.
In the Maximum Service Instance Pool Size box, enter the
maximum number of instances in the pool for a given service. This
setting controls the number of threads that can execute a given
service at a given time. The default value is 0, which results in
unlimited pool size.
In the Maximum Asynchronous Service Instances box, enter
the maximum number of instances from the pool that can be used to
service asynchronous requests at any given time. This setting allows
the service to limit the number of requests that it can handle in
parallel.
In the Invocation Wait Timeout box, enter the number of milliseconds
to wait for a service to become available for an invocation request.
If you do not specify a value for this setting, the default is 0,
which results in no wait time.
Click Save.
Remove poolingIn Administration Console, click Services >
Applications and Services > Service Management.
On the Service Management page, click the service to configure.
Click the Pooling tab.
In the Request Processing Strategy list, select either New
Instance For Each Request or Single Instance For All Requests.
- Single Instance for All Requests:
- A service instance is created and cached when the first request
comes into the container. Every request after that request uses
the same service instance to handle the request.
- New Instance for Each Request:
- A new service instance is created for each invocation received.
Click Save.
|
|
|