I had tried that as well... and just tried again to prove....

configuration.SetProperty(Environment.CurrentSessionContextClass,
typeof(CurrentSessionContext).AssemblyQualifiedName);

same error....

On Oct 9, 5:41 pm, Fabio Maulo <[email protected]> wrote:
> Yes... AssemblyQualifiedName or, at least, FullName and Assembly name.
>
> 2009/10/9 chris <[email protected]>
>
>
>
>
>
>
>
> > Hi,
> > I'm trying to implement my own CurrentSessionContext based on the uNH
> > ThreadLocalConversationalSessionContext.
>
> > I've turned on logging, and the log shows the
> > current_session_context_class being set.  However, as soon as I try to
> > access the GetCurrentSession() method of the factory, I get an
> > exception (below) and when I check, the CurrentSessionContext class is
> > null.
>
> > The only difference in my setup that I can note to the working uNH one
> > is the fact that I'm using C# to configure my class.
>
> >    configuration.SetProperty(Environment.CurrentSessionContextClass,
> > "MyApplication.Common.NHibernate.Conversation.CurrentSessionContext");
>
> > Any ideas how I can resolve this?
>
> > Many thanks,
> > Chris
>
> > 2009-10-09 16:59:18,068 [9] DEBUG NHibernate.Impl.SessionFactoryImpl
> > [(null)] <(null)> - instantiating session factory with properties:
> > {'use_reflection_optimizer'='True',
> > 'connection.provider'='NHibernate.Connection.DriverConnectionProvider',
> > 'dialect'='NHibernate.Dialect.MsSql2005Dialect',
> > 'connection.driver_class'='NHibernate.Driver.SqlClientDriver',
>
> > 'proxyfactory.factory_class'='NHibernate.ByteCode.Castle.ProxyFactoryFactor 
> > y,
> > NHibernate.ByteCode.Castle', 'show_sql'='False',
> > 'connection.connection_string'='xxxxxxx;',
>
> > 'current_session_context_class'='MyApplication.Common.NHibernate.Conversati 
> > on.CurrentSessionContext'}
>
> > NHibernate.HibernateException: No CurrentSessionContext configured
> > (set the property current_session_context_class)!
> >   at NHibernate.Impl.SessionFactoryImpl.GetCurrentSession()
>
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to