I see what you are saying and incidentally there are 2 ways to "keep the session alive".
One is what you are saying, using the OpenSessionInViewInterceptor
The second is: OpenEntityManagerInViewFilter.
Both can work, I think the OpenSessionInViewFilter would be nicer to use...
anyway I did this:
Code:
<filter>
<!-- <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> -->
<filter-name>OpenEntityManagerInViewFilter</filter-name>
<filter-class>
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>flushMode</param-name>
<param-value>AUTO</param-value>
</init-param>
</filter>
but it still did not work!