wood burning stoves 2.0*
The moose likes JDBC and the fly likes Single Connection Instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Single Connection Instance" Watch "Single Connection Instance" New topic

Single Connection Instance

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi guys! Could you please evaluate some problems regarding having only a single Connection instance in your app? The app is intended to be used by the public and let's say we're having 5 visitors per second who are simultaneuosly accessing the site? Thanks!

SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30116

The main problem is that your connection becomes the bottleneck. Typically several things are going on at once in a web app and you don't want to process users one at a time. People typically use connection pooling to avoid this problem.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: Single Connection Instance
Similar Threads
Hot Deploy DataSource in Tomcat?
overriding init() to make a database connection:nullpointer Exception
when to use different connections
Opinions - Singleton or Connection Pool?
Connection pool in cluster environment