BEA WebLogic Server Tuning Guide
14
The following is a simple matrix showing the various combinations of connection pooling:
WebLogic Server
Connection Pool and
DataSource Types
Connection Pooling Statement Pooling Usage Considerations
Non-XA connection Pool
with non-transaction
Datasource
Use WebLogic
Server connection
pooling.
Use default JDBC
connection
pooling.
Disable WebLogic
Server Statement
caching.
Enable JDBC driver
statement pooling.
Use to access NonStop
Resources from servlets,
stateless session beans, etc.
when the WebLogic Server
transaction is used to access
NonStop server resources
only.
For CMP beans, this cannot
be used.
XA connection pool with
transactional Datasource
Use WebLogic
Server connection
pooling.
Use default JDBC
connection
pooling.
Disable WebLogic
Server Statement
caching.
Enable JDBC driver
statement pooling.
When a WebLogic Server
transaction accesses NonStop
server resources and other
resources (like WebLogic
Server JMS).
As the persistence Datasource
for CMP beans
For Bean Managed Entity
Beans which can be invoked
remotely.
3.7 Configuring the Number of Connections in a Connection Pool
When configuring Connection Pools, it is recommended that you set the Initial and Maximum Capacity to the same
value. This means that all required JDBC Connections will be acquired during application server startup. To specify
the initial and maximum capacity of a Connection pool, specify the properties InitialCapacity and MaxCapacity in
the JDBC Connection Pool configuration.
Performance tests have shown that restricting the total number of connections configured for a connection pool to
the absolute minimum required value (typically four connections per connection pool for heavy usage scenarios)
provides higher performance
10
. Because restricting the number of connections has a direct impact on the number of
EJB or servlets that can access the database, it is important that the number of the components accessing the
connection pool also be throttled. To throttle the maximum number of EJBs, specify the WebLogic Server deployment
descriptor parameter <max-beans-in-free-pool> in the file webLogic-ejb-jar.xml to restrict the maximum number of
EJBs that are created by WebLogic Server. It is recommended that this value be set to the maximum connection pool
capacity (which ideally is four, as mentioned above for heavy SQL usage scenarios).
Examples
Sample JDBC Connection Pool Element extracted from a configuration using the non-XA driver:
<JDBCConnectionPool
CapacityIncrement="1"
ConnLeakProfilingEnabled="false"
DriverName="com.tandem.sqlmx.SQLMXDriver"
InitialCapacity="4"
10
This is a well-known fact that can be applied to many resources – use what you need and no more. However, typically in transaction processing environments,
there might be an urge to over configure resources.










