You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/09/25 02:30:35 UTC

[GitHub] qq405576297 opened a new issue #2549: hibernate开启延迟加载,远程调用抛出failed to lazily initialize a collection, could not initialize proxy - no Session

qq405576297 opened a new issue #2549: hibernate开启延迟加载,远程调用抛出failed to lazily initialize a collection, could not initialize proxy - no Session
URL: https://github.com/apache/incubator-dubbo/issues/2549
 
 
   ORM框架如果开启延迟加载,dubbo服务无法感知远程的consumer层在合适的时机关闭连接,在hibernate中叫session,如果提前关闭连接到导致consumer层抛出 lazy exception之类的异常。
   org.hibernate.LazyInitializationException: failed to lazily initialize a collection, could not initialize proxy - no Session
   此时,dubbo服务层应该在合适的时机来关闭session的连接,此其一解决方式。在dubbo框架中应该如何来做呢?请指教.
   关闭延迟策略,很多人应该会想到这个方案,但选择用ORM框架 应该结合其优点。而这种方案是在避开问题!
   使用JPA 开启延迟策略,也会有同样的问题。
   往大神指教策略,谢谢~~~

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org