From: Gavin_King/Cirrus%<CI...@ci...> - 2002-05-12 00:16:34
|
Oh yuck! Wow, I'm _amazed_ this wasn't discovered earlier. What an awful bug! I guess people just havn't been using various combinations of functionality, so havn't noticed. I guess it went unnoticed because autoclose is only used by deprecated methods, and autocommit defaults to true - which would be the correct value of autoclose under the most common usage of hibernate. Oh well. I will release a new version just for that bugfix. Thanks Anton. > In the method RelationalDatabaseSessionFactory.openSession( > Connection conn, boolean autoClose, long timestamp), the > autoClose and autoCommit arguments being passed to the > RelationalDatabaseSession constructor are the wrong way > around, and need to be swapped. > The symptom, in my case, was that I was supplying an external > connection to openSession, but Hibernate was returning null from > Session.close(), instead of the external connection. In addition, > it was apparently retaining the connection for its pool (in > DriverManagerConnectionProvider.closeConnection). |