Hello,

I am using Hibernate in my Struts project. A have a problem with Hibernate lazy 
option. When I am setting it to true, I get an error in my JSPs:

org.apache.jasper.JasperException: could not initialize proxy - the owning 
Session was closed

Of course I know why this error occurs. I am closing the session at the end of 
each action - before JSPs processing. My question is how clever solve this 
problem? lazy="false" is not acceptable because I have a table with so many 
joins that database is going down.

My only idea is to include a bean and run sessionClose() method at the end of 
each JSP... but it is a very dirty method. :-( As far as I know, there is no 
method to run any code "at the end" of Struts execution.

If you have any ideas or solutions I would be very gratefull.

Best regards,
Konrad Billewicz



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to