Hi,
I have created a .net application, which using NHibernate 2.1.0.4000 to
connect with SQL server and the configuration is given as 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 the default schema improves the query execution plan
generated by SQL server -->
<property name="default_schema">dbo</property>
<property name="connection.isolation">ReadUncommitted</property>
<!-- Specifying the 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, the isolation level is specified as
ReadUncommitted .But isolation level is not used while establishing a
connection to the database. Instead it’s taking the default isolation level
as ReadCommitted to proceed.
Doing some investigation its observed that if session.BeginTransaction() is
specified in the code then isolation level is taken as the configured value.Is
there
any way to connect database with isolation level as “ReadUncommitted” (or
isolation level from the settings) without setting
session.BeginTransaction().
Please share thoughts.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.