Creating a Connection Pool
To create a new connection pool, use the method addClientPool(). The maximum number of defined connections cannot be increased. You should therefore choose a value that is sufficiently large for the application. Multiple versions of addClientPool() enable you to define the logon information in different ways. The example below uses a properties object, which is created from a file that uses a utility class with the name OrderedProperties (subclass of Properties). The diagram below shows the example file logon.properties.

OrderedProperties logonProperties = OrderedPropertiess.load (“/logon.properties“); JCO.addClientPool (POOL_NAME, // pool name 5, // max. number of connections logonProperties); // properties
|
jco.client.client=001 jco.client.user=userid jco.client.passwd=**** jco.client.ashost=hostname jco.client.sysnr=00 |
For information on further procedures, see:
· Acquiring and Releasing a Connection
The complete example program for creating a connection pool: