.net - NHibernate connection.isolation settings is not used while establishing a connection to the database -


i have created .net application, using nhibernate 2.1.0.4000 connect sql server , configuration given below.

<nhibernate xmlns="urn:nhibernate-configuration-2.2">     <session-factory>       <property name="connection.provider">nhibernate.connection.driverconnectionprovider</property>       <property name="connection.driver_class">nhibernate.driver.sqlclientdriver</property>       <property name="connection.connection_string">server=(local);database=mydb;integrated security=sspi;</property>       <property name="dialect">nhibernate.dialect.mssql2008dialect</property>       <property name="show_sql">false</property>       <property name="proxyfactory.factory_class">nhibernate.bytecode.castle.proxyfactoryfactory, nhibernate.bytecode.castle</property>       <!-- specifying default schema improves query execution plan generated sql server -->       <property name="default_schema">dbo</property>       <property name="connection.isolation">readuncommitted</property>       <!-- specifying 2nd level cache -->       <property name="cache.provider_class">nhibernate.caches.syscache.syscacheprovider, nhibernate.caches.syscache</property>       <property name="cache.use_second_level_cache">true</property>       <property name="cache.use_query_cache" >true</property>       <mapping assembly="myassemply" />     </session-factory>   </nhibernate> 

in nhibernate configuration, isolation level specified readuncommitted. isolation level not used while establishing connection database. instead it’s taking default isolation level readcommitted proceed. doing investigation observed if session.begintransaction() specified in code isolation level taken configured value. there way connect database isolation level “readuncommitted” (or isolation level settings) without setting session.begintransaction().

please share thoughts.

the behavior correct.

transaction isolation levels set when starting transaction. consistent recommendation of work inside explicit transactions.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -