ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: ibatis 3 memory leak
Date Thu, 14 Jan 2010 18:02:40 GMT
If it uses nested result maps or nested selects, I'm afraid you're out
of luck.   You'll need to reduce the query results, or flatten out the
results.

Clinton

On 2010-01-14, Dave Rafkind <dave.rafkind@gmail.com> wrote:
> Hi ibatis list, I'm new to ibatis so perhaps this is a noob question. I'm
> using Ibatis 3 (ibatis-3-core-3.0.0.216.jar) with a somewhat complicated
> schema (plenty of circular links etc).
>
> I'm doing something like this:
>
> List<MyIdObject> ids = session.selectList("getAll");
>
> for (id : ids) {
>   MyObject o = session.select("getOne", id.getActualId());
> }
>
> The first query returns a list about 2k big, and the second query in the for
> loop returns objects that are somewhat large (have several collections in
> them, a discriminator, etc).
>
> The problem I have is that as the for loop marches on it uses an
> ever-increasing amount of memory. I would assuming that when the objects in
> the body of the for loop go out of scope they can get garbage collected, but
> apparently that never happens; is there some weird interaction with the
> "first-level cache"? Should I be going about this a different way?
>
> Thanks!
> Dave
>

-- 
Sent from my mobile device

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message