Hi,
We are working on a Web Application project, using the concept of "long sessions".
In this process we experienced an unexpected behaviour of the Hibernate Session:
- we store the Hibernate Session in the HttpSession.
- in consecutive requests we are connecting and disconnecting from the Hibernate Session.
- we were expecting that an object, once loaded in the Hibernate Session, will remain loaded as long as the Session is not closed.
However we found out that this is true, only when the "think time" is very short.
If "think time" is longer, when we reconnect to the session in the next request, the object is no longer available and a new database query is issued.
Is this the intended behaviour of Session cache, or we are doing something wrong?
Hibernate Version: 3.0.5
Database: Oracle 9i
Thanks
|