开发者

What is side effects of not closing org.hibernate.classic.Session after querying?

I wonder what can happen and what 开发者_如何学编程is not guaranteed.


  1. You will eventually run out of database connections in the connection pool.
  2. You can run out of memory and the jvm will throw an out of memory exception.

And there can be many more, above are the ones I have faced due to mishandling sessions in my previous projects.

On second thoughts, imagine not using the loo for a week (you should get the idea :D)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜