Joined: Wed Nov 08, 2006 11:03 pm Posts: 1 Location: Chennai, India
|
Hi,
We are using Hibernate 3.1 with Oracle 10g in a WAS environment for a web application using STRUTS. We use connection pooling provided by WAS and have implemented Thread pooling using edu.emory.mathcs.backport.java.util.concurrent Api.
The problem we face is that whenever the connection pool limit is reached the thread which calls hibernate opensession hangs. we use session-per-operation pattern and the session never gets closed when we call it via thread from thread pool.
From Hibernate tutorials , we find that session object will be attached to local thread when using JDBC. This session object never gets closed even after the thread has completed all its works. So when the same thread is being re-used, it is not able to open new session. It hangs at point session.beginTransaction.
We have used session.close and session.flush in finally block.
Can somebody help us in solving the issue as to how to detach a session object from the thread or to close the session properly?
_________________ Thanks and Regards
Anand Inbasekaran
"Give me more medals, I would win you any war"
|
|