Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 4976 invoked from network); 9 Oct 2006 17:01:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Oct 2006 17:01:06 -0000 Received: (qmail 99146 invoked by uid 500); 9 Oct 2006 17:01:00 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 99051 invoked by uid 500); 9 Oct 2006 17:01:00 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 99018 invoked by uid 99); 9 Oct 2006 17:01:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Oct 2006 10:01:00 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Oct 2006 10:00:59 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CB8387142DB for ; Mon, 9 Oct 2006 10:00:21 -0700 (PDT) Message-ID: <28669735.1160413221830.JavaMail.root@brutus> Date: Mon, 9 Oct 2006 10:00:21 -0700 (PDT) From: "Gilles Bayon (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Commented: (IBATISNET-185) Allow custom ISessionStoreFactory In-Reply-To: <6638574.1160368219606.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/IBATISNET-185?page=comments#action_12440926 ] Gilles Bayon commented on IBATISNET-185: ---------------------------------------- -1 The HybridSessionStoreFactory is not the solution, there should be only 2 SessionStoreFactory in iBATIS : HttpContextSessionStore for Web environnement and CallContextSessionStore for other environnement. > Allow custom ISessionStoreFactory > --------------------------------- > > Key: IBATISNET-185 > URL: http://issues.apache.org/jira/browse/IBATISNET-185 > Project: iBatis for .NET > Issue Type: Improvement > Components: DataMapper, DataAccess > Reporter: Ron Grabowski > Priority: Minor > > The interfaces and abstract class in IBatisNet.DataAccess.SessionScope and IBatisNet.DataMapper.SessionScope should be combined and moved into IBatisNet.Common and a new interface named IBatisNet.Common.SessionStore.ISessionStoreFactory should be created: > public interface ISessionStoreFactory > { > void Initialize(IDictionary properties); > ISessionStore GetSessionStore(string sessionStore); > // void Shutdown(); ??? > } > "setting" nodes in the SqlMap.config file currently only contains boolean values. I think we should keep with that convention if possible and introduce a seperate node named "sessionStoreFactory" that should mimic the custom cache support (allow properties to be passed into the Initialize method): > > > > IBatisNet should ship with at least two factories: > > CallContextSessionStoreFactory > HybridSessionStoreFactory (HttpContext != null ? HttpContextSessionStore : CallContextSessionStore) > The default factory would be HybirdSessionStoreFactory. The user could manually specify one of the built-in factories by using an upper case alias: > > > For the DataAccess project, a context could use a custom session store factory like this: > > > > > > The IDictionary passed into ISessionStoreFactory.Initialize would contain three keys: resource, sessionStoreFactory, and Hello. > If you wanted to always use CALLCONTEXT with a data access context: > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira