This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes What Does DataSorce Manage Connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What Does DataSorce Manage Connections" Watch "What Does DataSorce Manage Connections" New topic
Author

What Does DataSorce Manage Connections

ravisha andar
Ranch Hand

Joined: Feb 25, 2011
Posts: 55
Hi All,

How exactly does a datasorce manage connections.

Suppose i have configured a datasource with max connections 50.

What will happen if 51 users login concurrently?

How do I handle a concurrent login of 100 users ?

Do i have to set the maximum connections as 100?

Will it be a performance hit.

Please help me understand this?


Thanks

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3702
    
    5

If each user is holding a database connection, you've got a problem right there. Users should never "hold" database connections except for very specific types of applications. Connections in a pool are shared and swapped out all the time. Users may use 10 different distinct connections during their session without even knowing it.

The limit in your example is that a maximum of 50 concurrent processes can hold a connection at a given time. Any processes passed that will either wait or get an out of resource exception.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What Does DataSorce Manage Connections
 
Similar Threads
WebSphere Studio v5 & Connection Pooling
Stateful connections
Connection Pool (standalone/server)
How do the connections get closed in Connection Pool
Web application goes extremely slow with more than 5 users logged in