-->
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.  [ 3 posts ] 
Author Message
 Post subject: Lazy Initialization in multi tier application
PostPosted: Sat Mar 13, 2004 7:00 pm 
Newbie

Joined: Sat Mar 13, 2004 6:30 pm
Posts: 1
There is a known problem to initialize an object from a lazy collection after the session was committed. I successfully solved this problem in Hibernate 1.2. by rewriting cirrus.hibernate.proxy.LazyInitializer class.
In initialize() method I open a new session, get an object and commit the session.

I am going to move to version 2.1, are there some issues to solve the problem in other way?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 13, 2004 7:01 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You should not do that. Read this thread:

http://forum.hibernate.org/viewtopic.php?t=927828

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 13, 2004 7:03 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
This is a list of the options you have:

http://forum.hibernate.org/viewtopic.php?t=928128

Don't open random Sessions.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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