ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Rafkind <dave.rafk...@gmail.com>
Subject ibatis 3 memory leak
Date Thu, 14 Jan 2010 17:02:44 GMT
Hi ibatis list, I'm new to ibatis so perhaps this is a noob question. I'm
using Ibatis 3 (ibatis-3-core- 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?


View raw message