Database Connection Pooling

Database connection pooling in the CML is managed with the object pooling that MTS provides. Object instance management is indirectly managing a pool of database connections that can be shared by multiple clients. The CML application creates data source connections using the ActiveX Data Objects (ADO) Connection object and uses MTS to pool and recycle the connections. CML uses the MTS implicit resource management, known as resource pooling, to cache ODBC connections between uses.

When an application component requests a database connection, any suitable free connection in the pool is located and allocated to the component. If no suitable database connection is available a new connection is created. When the application closes the database connection the connection is returned to the pool.

Recycling connections improves the CML application's performance, because time is saved when new connections do not have to be made. Scalability improves because fewer connections can service more clients. The ability to share existing database connections is key to the CML application's scalability.

There is no exact formula for setting either the maximum number of connections or the number for each user, although Web-based architecture generally uses connection pooling and a design strategy that anticipates one stateless connection for each active Web page.