| Author |
two servlets, one datasource
|
Toby Davis
Ranch Hand
Joined: Apr 09, 2002
Posts: 65
|
|
I have a named JDBC datasource with pooling enabled that's maintained in my application server (i.e. JRun, WebSphere, etc). Is it smart to have two different servlets using the same named datasource? Or is it better practice to have one datasource per servlet (even though each datasource ties into the same database)? (If this is too simplified and more detail is needed, pls let me know) --- [ May 21, 2002: Message edited by: Toby Davis ]
|
SCJP2 (1.4)
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
If u are going to use the same database with the same configuration values (e.g. user name,pool size etc) then go for the same datasource.
|
Groovy
|
 |
arun sahni
Ranch Hand
Joined: Jan 16, 2002
Posts: 91
|
|
|
I think connection pooling is better option.
|
Arun Sahni<br />SCJP2,SWCD,<br />BEA Certified Specialist: Server <br />JCert Enterprise Developer for BEA.
|
 |
Kelly Harris
Greenhorn
Joined: Mar 27, 2002
Posts: 22
|
|
|
Data Pooling is great the only caveat you have to pay attention to is the number of connections. Older versions of Access only allowed a small number of connections (like 20) at the same time. More recent versions of the drivers allow a more realistic amount.
|
 |
 |
|
|
subject: two servlets, one datasource
|
|
|