NHibernate WinForms 多个 (SessionScope) 睡眠会话性能
我已经使用 Castle AR (SessionScope) 实现了每个表单的 NHibernate Session 方法,如果我打开一个表单,我会打开一个 (SessionScope) 会话并在表单关闭时处理它。如果我打开N个单一表单,只要打开表单,我就会有N个db打开休眠会话,问题是:休眠会话意味着性能问题?在db上打开N个休眠会话是错误的吗?
I've implemented NHibernate Session per Form aproach with Castle AR (SessionScope), if i open a form, i open a (SessionScope) session and Disposes it at form close. If i open N single forms i have N db opened sleepy sessions as long as the form is opened, the question is: Sleepy sessions implies performance issues? is it wrong to have N opened sleepy sessions on db?.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
轻量级 参见
更新:
我不认为这将意味着性能问题,也许会达到服务器可接受的最大连接数,但前提是所有休眠会话都会不时执行某些操作,否则肯定会超时。
lightweight see
Update:
I dont think that this will imply performance problem, maybe the servers maximum acctepted connections will be reached, but only if all sleeping sessions will perform something from time to time, otherwise thay will surely timeout.