hello I am trying to use lazy loading with richfaces,jpa,spring hibernate for my page search.faces .I got it to work in my page by adding to web.xml <filter> <filter-name>JpaFilter</filter-name> <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class> <init-param> <param-name>entityManagerFactoryBeanName</param-name> <param-value>entityManagerFactory</param-value> </init-param> </filter> <filter-mapping> <filter-name>JpaFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> but the problem is for example if a result is not found to a form submit, i bring the user to a page nofound.jsp, they click ok and i bring them back the the first page search.faces
then i get the lazy loading exception in this page that the session is closed,
is it possible to keep the lazy loading session open across two pages using the web.xml filter or is there another way to do it.
also when i go back to search.faces,it does not initialise from start as if i am entering it for the first time.
thanks anthony
|