Question

Is connection pooling enabled when you use a custom connection provider that generates connection strings dynamically? The user is the only data changed in the connection string, and many sessions can be opened for the same user through the time. By the way, I'm using NHibernate 3.0 to connect to a database in SQL Server 2005.

Was it helpful?

Solution

No matter how the connection string is generated, the ADO.NET pooling is used, however to bind a connection string to a pool the sting must be identical, so if the user name change this condition is not satisfied, and as a result you will obtain a connection from different pools for each user.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top