PDA

View Full Version : Enable Lazy Initialisation using blazeds and hibernate



krishnendra
May 29th, 2009, 08:45 AM
Hi All

I am having a problem trying to figure out how do i enable Lazy Initialisationwhen using Hibernate ,Spring and Blazeds

The reason for my trouble is that Blazeds would try to serialize everything which i would like to restrict

Yes Graniteds (an open source ) look-a-like for Blazeds has given that functionality
(it uses something called HibernateClassGetter and has some logic in its AMFSerialisation code)

but since this is from the Adobe wings would like the same happening here.
Any such adapters do they exist provided by spring which would support such a thing

Anopen discussion regarding the same would be helpful

davideanderson
May 29th, 2009, 12:13 PM
dpHibernate (http://code.google.com/p/dphibernate/) appears to be the solution of choice if you don't go the way of GraniteDS (http://www.graniteds.org/) or pimento (http://www.spicefactory.org/pimento/).

krishnendra
May 30th, 2009, 07:44 AM
Hi

I had contemplated the idea of using dphibernate but it fails on the use of persistent set as it checks for hibernate proxy and moreover their example takes into fact the use of HibernateProxy objects and the latest release of hibernate caters to the fact that lazy initialisations have a persistent collection as well

Moreover the code is in its nascent stage and is not mature enough to be considered as a product for production use

I was looking for an out of the box solution provided by spring which would handle spring proxy objects as well

Durden
Jun 1st, 2009, 07:30 AM
I had some thoughts about Lazy load in BlazeDS here: http://forum.springsource.org/showthread.php?t=71622