This content has been marked as final.
Show 2 replies
-
1. Re: Lazy exception in session scoped bean...
clerum Apr 18, 2012 10:29 AM (in response to hantsy)The entityManager used to create the User bean is only going to last for the conversation and thus likely will be gone after login (depending on your configuration)
The way to handle this is to tigger the load of the lasy collection during the login process so that the list is populated before the entity gets detached.
user.getMyThings().size();
-
2. Re: Lazy exception in session scoped bean...
hantsy Apr 19, 2012 11:51 AM (in response to clerum)I understand your meaning...it is a ugly soluition...
Now I used @Produces to generate another List bean for it directly to overcome the problem