In my application, Spring manages connection pool for database access. Hibernate uses these connections for its queries. At first glance, I have no problems with the pool: i
Check the config of your pool implementation. Usually, it's Apache DBCP which has a timeout for each connection after it will close it.
In your code, you shouldn't keep connections around. Get one, use it, close it immediately. The pool will make sure that this doesn't cost too much.