I think It should have the close(session) like others.Since we are not using EntityManager in an injected context, we should always close the Factory.
Maybe somebody forgot to take the comment slashes out, or, even better, after you a find a single object, you may as well do some operations with it, so if you close the factory at that method, maybe you will get an exception when you try to use the session to update the retrieved object. Please somebody correct me if I am wrong. Fernando On Fri, Mar 20, 2009 at 12:45 PM, dongnold <nguye...@utt.fr> wrote: > > Hi all, > > Please follow this link to go to the HibernateSimpleDao project > http://www.javapassion.com/handsonlabs/hibernatebasics/#2.2 > > Look under SimpleEventDao.java > > I'd like to ask why the "find" method doesn't have > HibernateFactory.close(session) like the remaining methods? > > Thank you in advance! > > Hung > > > > -- Fernando Abreu fxab...@gmail.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---