Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One Connection is sufficient?

 
Kousik Majumder
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a query about jdbc that whether a(one) connection is enough for an application.
If not why?
And why do I need multiple connection for an application?


Thanks,
Kousik
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your application only needs one connection, then one connection is sufficient.
A single user application that does no parallel processing might only need one connection.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kousik Majumder wrote:And why do I need multiple connection for an application?

Expanding on Jan's reply: Suppose you are running Amazon.com and have tons of users. Do you want them waiting on the single connection. The same idea for this site. Do you want to wait in a queue with everyone who wants to post. That would make things unbearably slow!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic