[jboss-user] [Beginners Corner] - Re: why Session would close under stress test?

francis17101970 do-not-reply at jboss.com
Fri Sep 12 09:34:36 EDT 2008


You should provide some more info about your system.
Anyway it is it seems that more Thread are accessing the Hibernate Session Object and you eventually try to manipulate a Session which has been closed.....
If you are closing the session yourself, and it's not an error, you might want to think about extending the life of the session. A very, very common pattern is to open a Hibernate Session transaction as soon as a request comes in. Then, when all the processing is done, from the Servlet to the final JSP, the transaction is closed. This can be achieved by opening and closing the Hibernate Session in a ServletFilter.

Take a look at this:
http://www.hibernate.org/42.html#A8

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176130#4176130

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176130



More information about the jboss-user mailing list