Reputation: 1835
We use NHibernate with fluent configuration in our web application.
We have a single configuration database and a multitude of different databases holding customer data.
For each database we make a fluent configuration and a SessionFactory when it is first used.
We obtain sessions by calling the OpenSession method on it, and dispose it when we are through with it.
However sometimes we get an error message that the ADO data-reader is still active when we attempt to read. Indicating that NHibernate is trying to (re)use the same connection, something we are trying to avoid.
How can we make sure that our database requests are handled by a connection in an atomic fashion. (No re-use by other requests)
I guess that recreating the SessionFactory might work, but that seems expensive
Upvotes: 0
Views: 268
Reputation: 1409
A few questions
I can't see how this should be nHibernate's fault. If the problem is easily reproduceable then maybe you can try to:
Upvotes: 2