Creating database connection pools and database connections

A database connection pool consists of a number of reserved database connections. The reserved database connections are made available only to the collaboration and map processes that you design to use the pool.

To create a database connection pool, you define the values necessary for making a database connection beforehand. The integration system saves this database connection information and uses it at runtime to more quickly establish connections for collaboration and mapping processes that you have assigned.

The configuration of database connection values that you define can be used by one or more pools. For each pool you will specify a number of connections; these connections will be allocated, used, and freed back to the pool.

Note:
It is recommended that you connect to the InterChange Server Express instance that will use the database connection pool in System Manager before you create the pool, so that you can validate the connection.

Do the following to create a database pool:

  1. Right-click the Database Connection Pools folder in your integration component library in System Manager and choose Create New Database Connection from the context menu.

    The "Database Connection" dialog appears.

    Note:
    Although the name of the dialog would suggest that what you are creating at this point is a database connection, it is really a database connection pool. In later steps you will define database connections within the pool.
  2. Select the appropriate value in the Database Driver drop-down menu--either DB2 (Type 2),or MQ SQL Server(Type 4)--depending on the database vendor.
  3. If you chose MQ SQL Server(Type 4)in the Database Driver drop-down menu, then you must type the name of the computer on which the database server resides in the Host name field.
  4. Type the name of the database in the Database field.
  5. If you chose MQ SQL Server(Type 4)in the Database Driver drop-down menu, then you must type the port number through which clients communicate with the database server in the Port number field.
  6. If you are connected to the InterChange Server Express instance that will use the pool, select that instance from the Connected Servers drop-down menu.
  7. Type a name for the pool in the DBConnection Name field. You specify this database connection pool name when writing Java code to establish the connection in maps or collaboration templates.
  8. Type the user name that should be used by InterChange Server Express to log in to the specified database in the Login field.
  9. Type the password for the user name.
  10. Type the maximum number of connections that should be established by the pool for all the individual database connection objects you plan to create within it in the Maximum connections field, or enable the Unlimited checkbox to allow as many connections to be established as are permitted by the database server configuration and licensing.
    Warning:
    Be careful when working in this field. It is not a single-line text field, even though it should be, so you can accidentally press Enter. You will not see the value you entered then, and will justifiably try to re-type the value. Then when you try to finish creating the database connection pool you receive an error that a valid value must be entered for the field. Do not press Enter in this field.

    Figure 34 shows the "New Database Connection Pool" wizard.

    Figure 34. Create New Database Connection wizard


  11. To create a new database connection object in the pool, right-click a row in the New Connection Pool table at the bottom of the wizard and choose New Connection Pool from the context menu.

    Note:
    Although the interface would suggest that what you are creating at this point is also a database connection pool, it is really a database connection object that you are creating within the pool you just created.

    The "Connection Pool" dialog appears.

  12. Type a name for the database connection object in the Name field.
  13. In the Minimum connections field, enter the minimum number of connections that the database connection object should establish. Note that the sum of the minimums for all the pools that you create in pool cannot exceed the maximum number that you specify for the database connection pool object itself. System Manager does not allow you to attempt to add a connection object or modify an existing connection object so that the maximum number of connections for the pool would be exceeded. Figure 35 shows the "Connection Pool" dialog.

    Figure 35. "Connection Pool" dialog


  14. Click Finish.

    System Manager saves the database connection pool object and an icon appears under the Database Connection Pools folder in the integration component library.

  15. Use the wizard to create another database connection pool at this time or click Cancel to close the wizard.

Copyright IBM Corp. 2004