开发者

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

开发者 https://www.devze.com 2023-02-28 19:31 出处:网络
I wonder what can happen and what 开发者_如何学编程is not guaranteed. You will eventually run out of database connections in the connection pool.

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

精彩评论

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