Sorry if I don't understand you correctly. You can indeed change a session factory configuration before it is created, but once it is created, you cannot play with it.
http://www.tunatoksoz.com/post/NHibernate-Integration-Facility-IConfigurationContributor.aspx Implement a contributor, register it to your container. Facility will call Process before it is initialized. Tuna Toksöz http://tunatoksoz.com http://turkiyealt.net http://twitter.com/tehlike Typos included to enhance the readers attention! On Wed, Mar 11, 2009 at 11:16 AM, dagda1 <[email protected]> wrote: > > > @Tuna, > > The sessionfactory is retrieved from the IOC container in this > instance as it is the NHibernate facility. > Does this mean it is not possible to access the session factory before > it is initialised? > > > It is a probably a singleton I am guessing also. > On Mar 9, 7:50 pm, Mauricio Scheffer <[email protected]> > wrote: > > Maybe DifferentDatabaseScope can help (http://www.darkside.co.za/ > > archive/2008/01/21/castle-activerecord-connecting-to-multiple- > > databases.aspx) > > > > On Mar 9, 10:46 am, dagda1 <[email protected]> wrote: > > > > > > > > > Hi, > > > > > I have a multi-tenant application that has a seperate website instance > > > and a seperate DataBase for each client instance. > > > > > I am trying to move as much functionality into central services that > > > are reachable by MSMQ. > > > > > I use Nhibernate and I use Castle's NhibernateIntegration. > > > > > With the NhibernateIntegration you can have a number of session > > > factories defined in the Configuration etc. > > > > > I really do not want to have to create a different sessionfactory for > > > each client. > > > > > Is there anyway I can change the connection string at runtime or is > > > there an approach that will avoid me having to create a seperate > > > sessionfactory for each client? > > > > > Cheers > > > > > Paul- Hide quoted text - > > > > - Show quoted text - > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
