WebLogic connection pool: define data source in Sterling Selling and Fulfillment Foundation

To define the data source name to Sterling Selling and Fulfillment Foundation, add the following entry in the <INSTALL_DIR>/properties/customer_overrides.properties file (see Property file):

   jdbcService.<dbvendor>Pool.datasource=<datasource name>
   

Where <dbvendor> = db2 or oracle

For example: jdbcService.oraclePool.datasource=MetadataDS

Additionally, to use the WebLogic datasource, ensure that you set the -Dvendor JVM argument to weblogic. For example: -Dvendor=weblogic

Note: In a sharded environment, you must provide the Metadata shard’s datasource as the value.

At initialization, Sterling Selling and Fulfillment Foundation uses the datasource name to find the connection pool in WebLogic. In the example above, the datasource name is MetadataDS.

IBM® recommends that you benchmark your application before migration to production to ensure that these values are set optimally. IBM also recommends that you continually monitor the connection pool usage levels to ensure that these parameters are set optimally.

Initial capacity

Bear in mind the following guidelines when setting the initial capacity attribute:

Note: The Oracle WebLogic Server Performance and Tuning manual (see Tune the Number of Database Connections) recommends setting the initial connection pool capacity equal to the maximum capacity. Unfortunately, if you to follow that recommendation, you can not determine the current pool usage levels since the pool usage would be equal to the initial and the maximum. As a result:

For that reason, we prefer to keep the initial capacity lower than the maximum capacity.

Maximum capacity

This attribute sets the maximum number of connections your pool can grow to within a single WebLogic Server instance. If you set this value to 27 and you have eight WebLogic Server instances, in theory, WebLogic could create up to 216 database connections.

Bear in mind the following guidelines when setting the maximum capacity attribute:

Allow shrinking and shrink frequency

This attribute pair informs WebLogic to release inactive connections if they have been idle for the period as specified by "shrink frequency". This has the advantage of releasing resources both at the WebLogic and database server end.

Prepared statement cache size

This attribute tells WebLogic to create a cache for each database connection that can store prepared statements up to the value specified.

Prepared statements are precompiled SQL statements that can be repeatedly invoked with different parameter values. Prepared statements reduce the need to compile the SQL statements.