Establishing connections is costly in terms of connectors, the relational database management system (RDBMS) network, and processing overhead. Database Connector supports the use of pooling profiles that enable you to build a connection pool. This is a group of established connections that the connector can use to perform required operations without having to establish new connections every time.
When you configure the Pooling profile field in the global element of your application, deselect the Test connection on checkout field to improve the connector performance with connection pooling. If you leave the field selected as default (TRUE), every time a connection is checked out of the pool, the connection pool performs connectivity checks against the database, which increases the time required for each operation to complete.
All connection type configurations accept the Pooling profile field configuration. In JDBC, pooling occurs at the data source level, so to enable pooling, you have to configure the global data source.
The following example shows how to configure a pooling profile for an Oracle database connection with the Test connection on checkout field set to FALSE:
-
In the Database Config window, in the Advanced tab, for Pooling profile select Edit inline.
-
Set the following fields:
-
Deselect Test connection on checkout.
This sets the field as FALSE.
-
For Column types select Edit inline.
-
Click the (+) plus sign to add a column type.
-
In the Column type window, set Id to 2003, Type name to 1000, and click Finish.
-
Repeat step 5.
-
To add a new column type, set Id to 2002, Type name to PHONE_NUMBER_ARRAY, and click Finish.
The following screenshot shows the configuration in Studio:
Figure 9. Pooling Profile Configuration
In the XML editor, the <db:pooling-profile> and testConnectionOnCheckout="false configurations look like these:
<db:config name="dbConfig">
<db:oracle-connection host="localhost" user="myuser" password="mypass" serviceName="orclpdb1">
<db:pooling-profile minPoolSize="4" maxPoolSize="30" testConnectionOnCheckout="false" acquireIncrement="1" maxWait="0" maxWaitUnit="SECONDS" preparedStatementCacheSize="5"/>
<db:column-types>
<db:column-type id="2003" typeName="PHONE_NUMBER" />
<db:column-type id="2002" typeName="PHONE_NUMBER_ARRAY" />
</db:column-types>
</db:oracle-connection>
</db:config>