Hi everyone.
The other day I was facing a strange issue, for some reason my Datasource (DBCP) was throwing an error. Exhausted pool. So at first I was thinking I was leaking connections due to sessions not being recovered.
Debugging the application showed I was recovering all sessions. It looks like once I opened the session hibernate asked for a connection to the Datasource, and for some reason it asked later for another connection. I found the guys of spring implemented a wrapper around the datasource which will return a proxy connection object, that once it is really needed it ask for the underlying datasource to get a connection (LazyConnectionDataSourceProxy). So have anyone experienced something similar. If so check this url:
http://static.springframework.org/sprin ... Proxy.html
P.S. Also does anyone know how can I deal with my previous post?