Hello,
I am facing the problem that when the application has been running for a bit the connection pool gets exhausted sometimes. I was wondering the following
1) I currently have most of my queries (just selects) surrounded by a transaction, is this needed, I started my first example this way and continued with it. I know this is a must for update/insert/deletes but is it needed at all for selects.
2) When due to some exception transaction is not committed/rolled back but the associated session is closed, does the connection associated with the session get returned to the pool or not?
3) The
WARNING: afterTransactionCompletion() was never called
warning that is seen, is that cause for concern or can it be ignored?
4) If any of the above are not causes for connections being lost, what kind of code is normally responsible for the connection pool exhaustion problem.
FYI, all my session.open calls have an associated finally which does
if(sess != null)
sess.close();
Thanks,
Sohil
|