Hi,
The Hibernate reference recommends extended session over open session in view. This is understandable as it eliminates the need to deal with detached entities. However, how does one keep the extended session available? The reference recommends storing it in an EJB stateful session bean and advice against storing it into the web session. Why? Is it because stateful beans support passivation for reducing the memory load?
In addition, no matter an EJB stateful session bean or the web session is used, due to replication, the session and all the entity instances in it must implement Serializable, right?
|