File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "Single Connection Instance" Watch "Single Connection Instance" New topic

Single Connection Instance

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 751
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
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Single Connection Instance
jQuery in Action, 3rd edition