Alex Rivera | Logout

How do you change NHibernate's connection string per HTTP request?

Asked 2009-01-29T10:28:09.177
9

As above really.

Edit
Report

1 Answer

4

Note that when supplying an IDbConnection to OpenSession(), you will not be able to use the 2nd level cache.

See https://forum.hibernate.org/viewtopic.php?f=25&t=959178

... "This is not a bug. If you are managing your own connections, NHibernate disables the use of second-level cache for the session to be safe."...

answered 2011-01-12T21:46:55.077

Your Answer