Tommy_Shen
11-20-2006, 10:38 PM
hi all,
This question is aslo about the NHibernate.LazyInitializationException, I had put the config into my web.config below:
<httpModules>
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewMo dule, Spring.Data.NHibernate"/>
</httpModules>
and, in my logfile I can see the OpenSessionInViewModule has worked:
2006-11-20 21:47:35,093 [3168] DEBUG Spring.Data.NHibernate.Support.OpenSessionInViewMo dule [(null)] - Opening single Hibernate Session in OpenSessionInViewFilter
2006-11-20 21:47:35,109 [3168] DEBUG Spring.Data.NHibernate.SessionFactoryUtils [(null)] - Opening Hibernate Session
2006-11-20 21:47:35,125 [3168] DEBUG NHibernate.Impl.SessionImpl [(null)] - opened session
2006-11-20 21:47:35,125 [3168] DEBUG Spring.Transaction.Support.TransactionSynchronizat ionManager [(null)] - Bound value [Spring.Data.NHibernate.SessionHolder] for key [NHibernate.Impl.SessionFactoryImpl] to thread []
... ...
... ...
[
2006-11-20 21:47:37,546 [3168] DEBUG Spring.Transaction.Support.TransactionSynchronizat ionManager [(null)] - Retrieved value [Spring.Data.NHibernate.SessionHolder] for key [NHibernate.Impl.SessionFactoryImpl] bound to thread []
2006-11-20 21:47:37,546 [3168] DEBUG Spring.Data.NHibernate.SessionFactoryUtils [(null)] - Opening Hibernate Session
2006-11-20 21:47:37,546 [3168] DEBUG NHibernate.Impl.SessionImpl [(null)] - opened session
but look the red text, these is another session opened..does the OpenSessionInViewModule not support Transactoin?:confused:
thanks for all reply.
This question is aslo about the NHibernate.LazyInitializationException, I had put the config into my web.config below:
<httpModules>
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewMo dule, Spring.Data.NHibernate"/>
</httpModules>
and, in my logfile I can see the OpenSessionInViewModule has worked:
2006-11-20 21:47:35,093 [3168] DEBUG Spring.Data.NHibernate.Support.OpenSessionInViewMo dule [(null)] - Opening single Hibernate Session in OpenSessionInViewFilter
2006-11-20 21:47:35,109 [3168] DEBUG Spring.Data.NHibernate.SessionFactoryUtils [(null)] - Opening Hibernate Session
2006-11-20 21:47:35,125 [3168] DEBUG NHibernate.Impl.SessionImpl [(null)] - opened session
2006-11-20 21:47:35,125 [3168] DEBUG Spring.Transaction.Support.TransactionSynchronizat ionManager [(null)] - Bound value [Spring.Data.NHibernate.SessionHolder] for key [NHibernate.Impl.SessionFactoryImpl] to thread []
... ...
... ...
[
2006-11-20 21:47:37,546 [3168] DEBUG Spring.Transaction.Support.TransactionSynchronizat ionManager [(null)] - Retrieved value [Spring.Data.NHibernate.SessionHolder] for key [NHibernate.Impl.SessionFactoryImpl] bound to thread []
2006-11-20 21:47:37,546 [3168] DEBUG Spring.Data.NHibernate.SessionFactoryUtils [(null)] - Opening Hibernate Session
2006-11-20 21:47:37,546 [3168] DEBUG NHibernate.Impl.SessionImpl [(null)] - opened session
but look the red text, these is another session opened..does the OpenSessionInViewModule not support Transactoin?:confused:
thanks for all reply.