| Author |
Dao - connection pool
|
aakash bhatt
Ranch Hand
Joined: Jan 09, 2003
Posts: 182
|
|
|
If the connection code is written in DAO. How will the app server do the connection pooling
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
It depends on how the DAO is implemented. The pattern itself doesn't mandate any particular approach to getting JDBC connections -- or even using one in the first place.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Sean Sullivan
Ranch Hand
Joined: Sep 09, 2001
Posts: 427
|
|
If you want to take advantage of the connection pooling provided by the application server, you will need to: 1) lookup the javax.sql.DataSource object via JNDI 2) invoke DataSource.getConnection() Example code: http://daoexamples.sourceforge.net/ Article: http://www-106.ibm.com/developerworks/java/library/j-dao/
|
 |
 |
|
|
subject: Dao - connection pool
|
|
|