ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: session leak in ibatis 2.0.8
Date Tue, 28 Dec 2004 15:18:39 GMT
What is your configuration? Were you handling transactions yourself
already or was IBatis handling them for you?


On Tue, 28 Dec 2004 14:55:35 +0100, Baldur Norddahl
<bbn-ibatis@inaphone.com> wrote:
> Hi,
> I have had alot of problems with orion lockups where I would get a ton
> of messages like:
> DriverManagerConnectionPoolConnection not closed, check your code!
> I have finally traced it to a session leak in ibatis. The first time a
> thread makes a query, ibatis will allocate a session for that thread.
> And then never release that session again unless you explicitly call
> endTransaction(). So if you have a system that regularly creates new
> threads, you will eventually run out of sessions.
> For now I have managed to work around this problem by making an
> endTransaction after every query. This simple change fixed all my lockup
> problems, and reduced the number of open database connections tremendiously.
> Another application that did not have problems with lockup, went from
> using 15+ database connections to 1. I suppose this is because now the
> connections actually get put back into the pool, instead of being
> claimed indefinitly by ibatis for all my threads.
> Baldur

View raw message