Are Ado.net (2.0+) Connection Pools pre Application Domain or per Process

时光毁灭记忆、已成空白 提交于 2019-12-02 13:24:56

问题


I'm trying to understand the pooling theory w.r.t. to interactions between ADO.NET and SQL Server much better and haven't found the definitive answer. I have always assumed per process but it's just occurred to me that it could be per AppDomain.

Any in depth references would also be appreciated.


回答1:


Connection pools are a complicated beast in that they are created in several differing scopes. According to SQL Server Connection Pooling on MSDN:

Connections are pooled per process, per application domain, per connection string and when integrated security is used, per Windows identity. Connection strings must also be an exact match; keywords supplied in a different order for the same connection will be pooled separately.

This means that you could have several connection pools within the same application based on how and where the connection is made.



来源:https://stackoverflow.com/questions/3526617/are-ado-net-2-0-connection-pools-pre-application-domain-or-per-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!