my dog learned polymorphism
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 this week in the OCAJP 8 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: 32628
    
215

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]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt in connection pooling
 
jQuery in Action, 3rd edition