![]() |
![]() |
||||
At line 3 added 6 lines. |
!What is a Connection Pool? |
When connecting to a database, a network connection needs to be established. This takes time, and if an area of code is called multiple times without using the same connection, the time delay becomes very noticeable. |
A better solution is to use a connection pool (see [DBCP]), and be sure to close connections when you are finished with them. This also provides a large performance boost, because connections can be re-used. |
\\ |
At line 16 added 1 line. |
\\ |
At line 11 removed 3 lines. |
A better solution is to use a connection pool (see [DBCP]), and close connections when you are finished with them. This also provides a large performance boost, because connections can be re-used. |