Re: Struts and Hibernate Session

2004-05-05 Thread Joe Germuska
At 2:10 PM +0200 5/5/04, Lionel wrote: Nicolas de Amorrortu wrote: Have you tried the following? http://www.hibernate.org/43.html. this is what I was thinking about when I posted my question...but haven't tried it yet. I don't think it will solve my problem as the object I load is put in session a

Re: Struts and Hibernate Session

2004-05-05 Thread Lionel
Nicolas de Amorrortu wrote: > Have you tried the following? http://www.hibernate.org/43.html. this is what I was thinking about when I posted my question...but haven't tried it yet. I don't think it will solve my problem as the object I load is put in session and can be accessed many requests late

RE: Struts and Hibernate Session

2004-05-05 Thread Nicolas de Amorrortu
Have you tried the following? http://www.hibernate.org/43.html. Regards, Nicolás -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lionel Sent: Miércoles, 05 de Mayo de 2004 08:58 a.m. To: [EMAIL PROTECTED] Subject: Re: Struts and Hibernate Session Joe Germuska wrote

Re: Struts and Hibernate Session

2004-05-05 Thread Lionel
Joe Germuska wrote: >> 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. > > This is actually how Hibernate is meant to be used. The session > lif

Re: Struts and Hibernate Session

2004-05-05 Thread Joe Germuska
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 ac

RE: Struts and Hibernate Session

2004-05-05 Thread Marco Mistroni
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- Fr