When you pass IDbConnection, NH can't trust that, so it doesn't update the cache, IIRC.
On Fri, Mar 13, 2009 at 12:32 PM, Ken Egozi <[email protected]> wrote: > If the domain is the same and all, then why create lots of factories? > say, on a multi-tenant app, where every tenant has it's own DB, and a > single application serves many tenants. The sessionFactory creation takes x > seconds, but for 100 tenants that's a lot. > instead there's the option of deriving from DriverConnectionProvider, and > injecting the correct connection-string to each tenant -> thus acheiving the > "multiple DB on a single SessionFactory" goal > > is it a weird suggestion? > > On Fri, Mar 13, 2009 at 3:45 AM, Ayende Rahien <[email protected]> wrote: > >> If the schema is the same, you can pass IDbConnection to the >> OpenSession.However, >> creating multiple session factories isn't expensive, you only need to create >> them once. >> >> >> On Thu, Mar 12, 2009 at 11:20 PM, tmsmith <[email protected]> wrote: >> >>> >>> Is it possible to use one SessionFactory for multiple databases (on >>> different servers)? Everything I read including NHibernate In Action >>> says to use one SessionFactory per database. This seems expensive. >>> >>> >>> >> >> >> > > > -- > Ken Egozi. > http://www.kenegozi.com/blog > http://www.delver.com > http://www.musicglue.com > http://www.castleproject.org > http://www.gotfriends.co.il > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
