Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 5
Registered: ‎09-01-2009
My Device: Not Specified

Database Connection Pooling

Connection pooling is a technique used to avoid the overhead making of new database connection every time. An application or server object requires access to a database. This technique of “pooling” connections is based on the fact that most applications only need a thread to have access JDBC connection when they are actively processing a transaction, which usually take only milliseconds to complete. While not processing a transaction, the connection would otherwise sit idle. Instead, connection pooling allows the idle connection to be used by some other thread to-do his useful work.

Connection pooling enables the ODBC driver to re-use existing connections to a given database from a pool of connections, instead of opening a new connection each time the database is accessed. By enabling connection pooling you can improve the overall performance of your application by lowering the time taken to open a connection to a database in the connection pool.

When a thread needs to do work against a MySQL or other database with
JDBC, it requests a connection from the pool. When the thread is finished using the connection, it returns it to the pool, so that it can be used by any other threads. The overhead time for establishing a database connection is typically around 1 to 3 seconds. This is the time it takes to locate the database server to establish communication channel and exchange information.  Sun has standardized the concept of connection pooling in JDBC through the JDBC-2.0 “Optional” interfaces, and all major application servers have implementations of these APIs that work fine with MySQL Connector.

Guru I
Posts: 19,017
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Database Connection Pooling

thank you for this valuable information.



The search box on top-right of this page is your true friend, and the public Knowledge Base too: