Nhibernate session deserialized in another APP Domain
We have fixed the null key exception by adding this item in theÿ nhiberSQLServerSettings.config
<add key=”hibernate.session_factory_name” value=”xxx_NHibernate_SQL_SessionFactory”/>
The reason was when nhibernate session was deserialized in another APP Domain (another server), it was looking for the sameÿsession factory by the name. Earlier we were not setting this name property so a randomly generated GUID was assigned as the sessionÿfactoryÿname. Implications were that the name of the session factory was different in different app domains in different server. Hence session couldn’t find its factory and so couldn’t deserialize itself. Resolution is just to add this property in the config file.
<add key=”hibernate.session_factory_name” value=”xxx_NHibernate_SQL_SessionFactory”/>
The reason was when nhibernate session was deserialized in another APP Domain (another server), it was looking for the sameÿsession factory by the name. Earlier we were not setting this name property so a randomly generated GUID was assigned as the sessionÿfactoryÿname. Implications were that the name of the session factory was different in different app domains in different server. Hence session couldn’t find its factory and so couldn’t deserialize itself. Resolution is just to add this property in the config file.
Comments
Post a Comment