Previous Contents Index DocHome Next |
iPlanet Unified Integration Framework Developer's Guide |
Chapter 4 Pooling Concepts
This chapter describes the concepts for setting up a pooling configuration node in the UIF repository.The chapter contains the following sections:
About Pooling
About Pooling
Pooling allows the ability to share scarce resources. In UIF, pools are used to share connections to a EIS from the iPlanet Application Server. UIF interacts with the enterprise connectors to allocate and reuse the pools to avoid unnecessary creation and destruction of connections to the EIS. Pools and their configuration information is defined in the repository for each datasource. In other words, each datasource defines its own connection pool which can be individually configured.An object in a UIF pool represents a connection to an EIS. The maximum number of connections in the object pool may be specified in the repository. A pool typically contains the number of connections required for the application to maintain a steady state.
When an iPlanet Application Server application enables a service provider, the enterprise connector attempts to obtain a connection object from the pool. If the pools maximum size has been reached and no object is available after a specified waiting period, the request times out. The timeout period can also be configured in the repository.
If a pool object remains unused for a period of time, the object is destroyed. You can specify how long to wait before unused objects are destroyed.
The use and longevity of pool objects are monitored by UIF periodically. You can specify the interval in which the monitoring occurs. Typically, the monitoring thread executes more frequently than the waiting period before an object is destroyed. However, setting the monitor interval too small can degrade performance.
Pooling Configuration
The pooling configuration for a service provider is specified with the following characteristics in the repository:
Bind Durations
A pooled connection is bound to a J2EE component for a specified period of time, called the bind duration, which is specified in a service provider type. Typically, the bind duration is only for the length of time it takes to execute a single method requiring the connection. Some operations, such as beginning a transaction, may require a longer bind duration.Bind durations are specified in the repository. UIF supports three bind durations, as follows:
Bind Duration Escalation
The bind duration may be changed dynamically by the enterprise connector. For example, at the beginning of a transaction, an enterprise connector may escalate the bind duration from method-bound to sp-bound, and reset the bind duration to method-bound when the transaction completes.
Bind Duration Timeouts
An sp-bound connection cannot be used by another service provider until the connection has been released by the first service provider. If the first service provider does not release the connection in a timely manner, a timeout occurs and the connection is forcibly released and returned to the pool. The timeout prevents a run away service provider that failed to call disable() from keeping the connection indefinitely.
Previous Contents Index DocHome Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated October 19, 2000