build the session factory when the application starts. dispose of it when the application ends. if you are using an IoC container put the session factory into the container after it's built. otherwise place the session factory in a public static accessor to get access to the session factory.
On Feb 4, 5:48 pm, Berryl Hesh <[email protected]> wrote: > Hello > > It seems convenient to bootstrap a SessionFactory in a simple static > bootstrapping class, with a static property that clients can get > sessions from as needed; but that feels awkward when it comes time to > clean it up. > > Are there any guidelines as to how to manage the SessionFactory > lifecyle? > > Apologies if this should have been so obvious that my grandma would > have been able to google it by now :-) > > Cheers, > Berryl -- 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.
