Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two servlets, one datasource

 
Toby Davis
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
arun sahni
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think connection pooling is better option.
 
Kelly Harris
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic