Hi, My 2 cents.... I have written an app running on jboss that uses hibernate. The code that uses hibernate is embedded in a plugin, and a Session is open and closed after every request
I m also waiting for suggestion on the topic :-) Regards marco -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lionel Sent: 05 May 2004 11:31 To: [EMAIL PROTECTED] Subject: Struts and Hibernate Session Hi ! I use struts 1.2 and Hibernate on Websphere 5. I use the struts plugin to store the SessionFactory on applicaiton context. Where is the best way to keep the current opened Hibernate Session ? -in the HttpSession of each user ? -in a singleton ? -... When to close this Session ? -after each request ? -when the HttpSession closes ? -... Acutally, I have put the getHibernateSession() on a ActionFormBase. After each SQL action (load, find...) I close the Session. I don't believe this is a good design and would like to improve it. Thanks for your advices... Lionel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]