Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

db connection question

 
Chris Montgomery
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with a team of people on revising a highly used web application.

Connection pooling is currently being used, but the existing approach doesn't properly release the connection back to the pool. To rewrite everything to utilize a pool would be quite painful.

The idea of using only one connection was brought up. No pool, just one connection that you keep up all the time. The idea was that since the application itself is single threaded you would never utilize the benefits of a pool anyway. True?

Having one connection makes me feel somewhat uneasy, but couldn't think of a reason why NOT to do it based on the single threaded concept.

Just looking for advise, ideas, things to watch out for.

Thanks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Connection pooling is currently being used, but the existing approach doesn't properly release the connection back to the pool

That is a bug, not a design decision.

I can't think of any situation where a single connection would be preferable to a connection pool (unless the application is a single user app then perhaps).
[ January 07, 2005: Message edited by: Paul Sturrock ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Is your "highly used web application" really single threaded? You can only process one request at a time?

Even if this is currently the case, you don't want to assume it will always be single threaded. Such a design makes scalability very hard.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic