Why is Hibernate Open Session in View considered a bad practice?

后端 未结 9 2082
轮回少年
轮回少年 2020-11-22 17:08

And what kind of alternative strategies do you use for avoiding LazyLoadExceptions?

I do understand that open session in view has issues with:

  • Layered
9条回答
  •  悲哀的现实
    2020-11-22 17:38

    This won't help too much but you can check my topic here: * Hibernate Cache1 OutOfMemory with OpenSessionInView

    I have some OutOfMemory issues because of OpenSessionInView and a lot of entities loaded, because they stay in Hibernate cache level1 and are not garbage collected (i load a lot of entities with 500 items per page, but all entities stay in cache)

提交回复
热议问题