-->
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.  [ 2 posts ] 
Author Message
 Post subject: LazyInitializationException and JSF (myFaces)
PostPosted: Mon Feb 05, 2007 2:05 pm 
Newbie

Joined: Fri Oct 27, 2006 11:39 am
Posts: 10
We started with a session-per-request methodology, but given the complex object hierarchies we employ, the overhead of re-attaching all of the session objects resulted in a performance hit with thousands of users. After moving to the Long Hibernate sessions, we were still experiencing LIE's. After some extensive research, it seems some have placed the blame for this on myFaces, for serializing/deserializing the Hibernate objects, thus detaching the objects from their sessions. Is this a likely scenario, and if so, what can be done about it? Would changing JSF to save state on the server fix this? Does it have to do with the Backing beans containing references to the entities? Would an AOP Aspect be a valid way to re-attach these entities?

I realize this post doesn't include specifics, but I'm really just asking for confirmation of the issue between JSF backing beans, and Hibernate entities, and perhaps some recommendations.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 05, 2007 3:05 pm 
Regular
Regular

Joined: Wed Dec 07, 2005 4:19 pm
Posts: 53
I would assume that any serialization would follow an object graph, and thus touch and hence (indirectly) initialize all lazy-loaded object members.
Hence, even if your objects became detached, they should be completely loaded by then...

Are you sure you did not close the 'long session' for the failing object(s)?
(just my $0.05) -- Martin.


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

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.