-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: lazy loading session closed richfaces spring jpa
PostPosted: Fri Nov 26, 2010 5:22 am 
Newbie

Joined: Fri Nov 26, 2010 5:07 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.