I replied with the same conclusion before I read this mail. You're correct in that there's currently no way to tell IBatisNet to ignore HttpContext and always return CallContextSessionStore(ISqlMapper).
----- Original Message ---- From: Zarar Siddiqi <[EMAIL PROTECTED]> To: [email protected] Sent: Sunday, October 8, 2006 7:01:06 AM Subject: Re: Writing a custom session store by implementing ISessionStore Thank you both for your replies. I'll try CallContextSessionStore first and see how it goes. If it doesn't do the job, then I'll go with the patch. I noticed the following code in SessionStoreFactory.GetSessionStore(): if (System.Web.HttpContext.Current == null) { return new CallContextSessionStore(sqlMapperId); } else { return new WebSessionStore(sqlMapperId); } This tells me that the ONLY way one can use CallContextSessionStore is by manually setting the HttpContext to null when initializing IBatis (I'm assuming right before the call to Configure or ConfigureAndWatch). Is this true or is there a better solution? I'm just not too sure about the side effects of setting HttpContext to null. Thanks, Zarar Siddiqi On 10/8/06, Gilles Bayon <[EMAIL PROTECTED]> wrote: > Currently, there's no way to specify a custom session store. > You don't have to impelment a new one; is already exist, see > CallContextSessionStore.cs. > > You must not use an other ISessionStore than WebSessionStore as you > may suffer lost of session. > > -- > Cheers, > Gilles > > <a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a> >

