开发者

Dynamic queries in Hibernate keeps in memory

I use Hibernate in my app and I have this question:

Queries are automatically generated by Hibernate, I use this code to retrieve objects from DB:

Object result = session.get(clazz, id);

where id is a Serializable object.

My app runs for a long time in batch execution. I take an .hprof file to study memory and I have th开发者_C百科is situation: lots and lots of String queries generated by Hibernate. With Eclipse Memory Analyzer (MAT), I see this:

Dynamic queries in Hibernate keeps in memory

So lots of select... like this are retained in memory and I don't know how to free or dispose them. My app runs out of memory after some time.

Any suggestion would be very helpful. Thanks in advance

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜