-->
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.  [ 8 posts ] 
Author Message
 Post subject: An idea: Lazy load by remote client
PostPosted: Mon Mar 14, 2005 11:13 pm 
Newbie

Joined: Tue Oct 19, 2004 8:04 pm
Posts: 8
Location: Newcastle, Australia
In these days of Gigabit networks would it be silly to have a remote client ask the server to load lazy collections for it.

Perhaps the proxy code have some code to recognise its been serialised onto a client and have call-back to a SFSB (or similar) that has the Hibernate session - which does the SQL and returns the details - without the client needing to know.

I would like a complete object graph and default everything to lazy. But I might want my client to browse the object graph.

Just an idea.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2005 4:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
old bad idea since it breaks transaction isolation.

-max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Remote lazy loading
PostPosted: Sat Nov 05, 2005 7:45 am 
Newbie

Joined: Tue Oct 19, 2004 8:04 pm
Posts: 8
Location: Newcastle, Australia
There are many architectures that might need this but I think some can be made work:

If the remote client is still serving a UI then the scope of the session is still a UI event - even though it corresponds to a long-running transaction on the server (by definition long-running but in reality not really) - therefore transaction isolation is not an issue in this situation.

A distrubuted object framework needs to start somewhere so why not with the problems that have a solution. Then smart people can make it do more and more.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 4:17 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Probably it is not trivial, but it is possible to implement "remote" lazy loading using statefull session bean as hibernate session and client side transaction demarcation (UserTransaction). It doe's not break transaction isolation (statefull session beans are designed for this stuff).


Top
 Profile  
 
 Post subject: Re: An idea: Lazy load by remote client
PostPosted: Tue Feb 07, 2006 1:48 pm 
Newbie

Joined: Thu Mar 31, 2005 5:01 pm
Posts: 16
See http://h3t.sourceforge.net

This framework does as you describe.
It was created because of a need to navigate large, recursive object graphs in a fat client.
Please feel free to make suggestions and hurl abuse (preferably constructive abuse).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 1:56 pm 
Newbie

Joined: Thu Mar 31, 2005 5:01 pm
Posts: 16
baliukas wrote:
Probably it is not trivial, but it is possible to implement "remote" lazy loading using statefull session bean as hibernate session and client side transaction demarcation (UserTransaction). It doe's not break transaction isolation (statefull session beans are designed for this stuff).


But wouldn't the SFSB then monopolize the underlying DB connection?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 2:01 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
There is no problems with stefull beans, but you must remove bean as soon as possible (bean per request must be optimal in web application).
It works http://www.hibernate.org/377.html without problems in my prototype. I can send code for your project, probaly you will find something usefull, there is lazy collection support too (client code depends on cglib).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 11:50 am 
Newbie

Joined: Thu Mar 31, 2005 5:01 pm
Posts: 16
Thanks, but I have in mind a fat client that wants to go back for associated data minutes or hours after the initial service call.
That's the kind of application for which I wrote H3T.


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