-->
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: Automatically re-attach to session instead of Lazy-exception
PostPosted: Fri Sep 23, 2011 3:37 am 
Newbie

Joined: Sun Jan 24, 2010 4:20 pm
Posts: 13
Hi.

EclipseLink has a nice feature which in practice eliminates lazy-load exceptions. It reconnects to the configured datasource for the respective entity-manager when loading an un-initialized proxy.

Is the Hibernate-team considering to implement this? Hibernate should have all info it needs to do this and as a programmer I really shouldn't be bothered if the db-connection is closed or not when navigating my model. Hibernate should just open a non-tx connection and fetch whatever it needs.

I have made an AspectJ-proxy implementing this if anyone is interessted, but this should really be feature provided by the persistence-provider IMO.

--
Andreas


Top
 Profile  
 
 Post subject: Re: Automatically re-attach to session instead of Lazy-exception
PostPosted: Fri Sep 07, 2012 5:29 pm 
Newbie

Joined: Sun Jan 24, 2010 4:20 pm
Posts: 13
If anyone is reading this, this issue has be addressed by Hibernate-4.1.7. Enable it like this: http://stackoverflow.com/questions/578433/how-to-solve-lazy-initialization-exception-using-jpa-and-hibernate-as-provider/11913404#11913404


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.