JDBC Connection Pooling
JDBC Connection Pooling
1)JDBC connection pooling is conceptually similar to any other form of object pooling.
2)All in all, JDBC database connections are both expensive to initially create and then maintain over time. Therefore, as we shall see, they are an ideal resource to pool.
3)If your application runs within a J2EE environment and acquires JDBC connections from an appserver defined datasource then your application is probably already using connection pooling.
4)If your application is not J2EE based then you may need to investigate using a standalone connection pool manager.
EXAMPLE:-
----------------------------------------
<Resource name="jdbc/ptportaldbTent" auth="Container" type="javax.sql.DataSource"
maxActive="20" maxIdle="5" maxWait="10000"
username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
logAbandoned="true" removeAbandoned="true" removeAbandonedTimeout="300"
url="jdbc:mysql://localhost:4928/ptpatientdbTent"/>
-------------------------------------------
DataSourceName=jdbc:mysql://localhost:4928/ptpatientdbTent
DbDriver=com.mysql.jdbc.Driver
DBUserid=root
DBPassword=root
DBConnectionPooling=no
-------------------------------------------
Thanks & Regards
Pavan Dhokne
1)JDBC connection pooling is conceptually similar to any other form of object pooling.
2)All in all, JDBC database connections are both expensive to initially create and then maintain over time. Therefore, as we shall see, they are an ideal resource to pool.
3)If your application runs within a J2EE environment and acquires JDBC connections from an appserver defined datasource then your application is probably already using connection pooling.
4)If your application is not J2EE based then you may need to investigate using a standalone connection pool manager.
EXAMPLE:-
----------------------------------------
<Resource name="jdbc/ptportaldbTent" auth="Container" type="javax.sql.DataSource"
maxActive="20" maxIdle="5" maxWait="10000"
username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
logAbandoned="true" removeAbandoned="true" removeAbandonedTimeout="300"
url="jdbc:mysql://localhost:4928/ptpatientdbTent"/>
-------------------------------------------
DataSourceName=jdbc:mysql://localhost:4928/ptpatientdbTent
DbDriver=com.mysql.jdbc.Driver
DBUserid=root
DBPassword=root
DBConnectionPooling=no
Thanks & Regards
Pavan Dhokne
Comments
Post a Comment