it has worked well for us. We let spring.Net manage transactions. Transactional methods are tagged with declarative transactional attributes and spring takes care of the rest.
On May 28, 8:46 am, Fabio Maulo <[email protected]> wrote: > How use an IoC and wire all application to it.(possible title for a blog > post). > > 2009/5/28 Waqar Sadiq <[email protected]> > > > > > > > > > As I mentioned, we are usign Spring.Net. Our data access objects > > derive from Spring's "HibernateDaoSupport" object. Here is the code > > for CurrentSession get property. > > > public ISession CurrentSession > > { > > get > > { > > ISession session = null; > > try > > { > > session = > > HibernateTemplate.SessionFactory.GetCurrentSession(); > > } > > catch (HibernateException) > > { > > session = DoGetSession(true); // spring method. > > } > > catch (Exception ex) > > { > > _logger.Error(_className, "CurrentSession", "Error > > getting a valid session", ex); > > throw; > > } > > return session; > > } > > } > > > On May 28, 7:27 am, Tuna Toksoz <[email protected]> wrote: > > > using (ISession session = CurrentSession) > > > { > > > > CurrentSession is a prop returning the same instance ? > > > > Tuna Toksöz > > > Eternal sunshine of the open source mind. > > >http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt... > > > > On Thu, May 28, 2009 at 3:25 PM, Waqar Sadiq <[email protected]> > > wrote: > > > > > using (ISession session = CurrentSession) > > > > {- Hide quoted text - > > > > - Show quoted text - > > -- > Fabio Maulo- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
