This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes how to give the real connection back to the pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "how to give the real connection back to the pool" Watch "how to give the real connection back to the pool" New topic
Author

how to give the real connection back to the pool

long meng
Ranch Hand

Joined: Oct 10, 2008
Posts: 58
i use the connection pool provided by websphere, i want to know if i call "session.close()", is that mean hibernate will give the connection back to the connection pool? if not, how to give it back, thanks!


SCJP 5.0 98%<br />SCWCD 5.0 in progress . . .
long meng
Ranch Hand

Joined: Oct 10, 2008
Posts: 58
i just tried this,


and the conn is null, is that mean the connection is already closed?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
session.close is supposed to close the connection and return it to the pool

long meng wrote:i use the connection pool provided by websphere, i want to know if i call "session.close()", is that mean hibernate will give the connection back to the connection pool? if not, how to give it back, thanks!


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to give the real connection back to the pool