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 doubt in connection pooling 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 "doubt in connection pooling " Watch "doubt in connection pooling " New topic

doubt in connection pooling

Sriram.Narayanan Thiagarajan

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
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

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]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: doubt in connection pooling
It's not a secret anymore!