本文介绍了连接池在 Subsonic 中是否正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到报告说,当在远程机器上与 sql server 一起使用时,连接池在 Subsonic orm 中不起作用.我不确定他们是如何监控这一点的,也许是使用分析器.

I am getting reports that connection pooling is not working in the Subsonic orm when used with sql server on a remote machine. I'm not sure how they are monitoring this, maybe with the profiler.

Subsonic 打开晚,关闭早,正如您在 orm 层中应该做的那样,但是实现是否有任何问题会导致连接过多?

Subsonic opens late, closes early as you are supposed to do in an orm layer, but is there any problem with the implementation that would cause too many connections?

推荐答案

在使用 SubSonic 时,有一种方法可以让连接保持打开状态.许多人认为,当您加载一个集合时,阅读器将为您关闭 - 但事实并非如此(一个类不应该在未经许可的情况下对另一个类进行操作).正是出于这个原因,有一个名为LoadAndCloseReader()"的方法.

There is a way for a connection to remain open when using SubSonic. Many people assume that when you load a collection the reader will be closed for you - but it's not (a class should never act on another class without permission). There is a method called "LoadAndCloseReader()" just for this reason.

如果你能找到更多,那就太好了.

If you could find out more that would be great.

这篇关于连接池在 Subsonic 中是否正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 18:25