-->
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.  [ 4 posts ] 
Author Message
 Post subject: LazyInitializationException
PostPosted: Sat Jun 18, 2005 9:20 am 
Newbie

Joined: Sat Jun 18, 2005 9:15 am
Posts: 8
Hi !!!

I wonder if someone have patched PersistentCollections so when they have a closed session they get a new one or reconect the one they have.
I was trying some solutions like OpenSessionInViewFilter, but they are too manually and a don't want to loose time in my development worring about that.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 18, 2005 10:37 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Woah, so you don't want to worry about transactional integrity. You are a real friend.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 18, 2005 5:08 pm 
Newbie

Joined: Sat Jun 18, 2005 9:15 am
Posts: 8
I think you don't understand.
Why I have to worry about my lazy collections. They have a session, so they have access to SessionFactorys. Why I have to deal with LazyExceptions. Why don't they get a connection ???


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 18, 2005 5:11 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Ok, I'll make an exception and explain for the thousands time (next time search the forum first): Hibernate will not randomly open up new sessions whenever you hit an unloaded object or collection. Doing so would give you ad-hoc transactional semantics. You don't want that. Here is a question you can answer yourself: What happens if the object that owns the collection has been deleted in the database, meanwhile, when Hibernate should load the collection behind the scenes? Now search the forum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.