This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes doubt in connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "doubt in connection pooling " Watch "doubt in connection pooling " New topic
Author

doubt in connection pooling

Sriram.Narayanan Thiagarajan
Greenhorn

Joined: Jul 21, 2006
Posts: 26
In Connection pooling

does all connections go through only one session or
they create their own session.


Thanks in advance
Sriram
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31415
    
184

Sriram,
Yes, a database session is open until the connection is closed - not just returned to the pool. This is how we can get a StaleConnection error. Sometimes a connection is in the pool that is no longer valid.


[OCA 8 book] [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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: doubt in connection pooling