initial-capacity: Setting the Initial Number of ManagedConnections max-capacity: Setting the Maximum Number of ManagedConnections capacity-increment: Controlling the Number of ManagedConnections

5-8 Programming Resource Adapters for Oracle WebLogic Server

5.4.1 initial-capacity: Setting the Initial Number of ManagedConnections

Depending on the complexity of the Enterprise Information System EIS that the ManagedConnection is representing, creating ManagedConnections can be expensive. You may decide to populate the connection pool with an initial number of ManagedConnections upon startup of WebLogic Server and therefore avoid creating them at run time. You can configure this setting using the initial-capacity element in the weblogic-ra.xml descriptor file. The default value for this element is 1 ManagedConnection. Because no initiating security principal or request context information is known at WebLogic Server startup, a server instance creates initial connections using a security subject by looking up special credential mappings for the initial connection. See Section 8.2.2.2, Initial Connection: Requires a ManagedConnection from Adapter Without Applications Request.

5.4.2 max-capacity: Setting the Maximum Number of ManagedConnections

As more ManagedConnections are created, they consume more system resources - such as memory and disk space. Depending on the Enterprise Information System EIS, this consumption may affect the performance of the overall system. To control the effects of ManagedConnections on system resources, you can specify a maximum number of allocated ManagedConnections in the max-capacity element of the weblogic-ra.xml descriptor file. If a new ManagedConnection or more than one ManagedConnection in the case of capacity-increment being greater than one needs to be created during a connection request, WebLogic Server ensures that no more than the maximum number of allowed ManagedConnections are created. Requests for newly allocated ManagedConnections beyond this limit results in a ResourceAllocationException being returned to the caller.

5.4.3 capacity-increment: Controlling the Number of ManagedConnections

In compliance with the J2CA 1.5 Specification http:java.sun.comj2eeconnector , when an application component requests a connection to an EIS through the resource adapter, WebLogic Server first tries to match the type of connection being requested with an existing and available ManagedConnection in the connection pool. However, if a match is not found, a new ManagedConnection may be created to satisfy the connection request. Using the capacity-increment element in the weblogic-ra.xml descriptor file, you can specify a number of additional ManagedConnections to be created automatically when a match is not found. This feature provides give you the flexibility to control connection pool growth over time and the performance hit on the server each time this growth occurs.

5.4.4 shrinking-enabled: Controlling System Resource Usage