In normal conditions for remote applications, lazy loading cant work.
Since the instances that is in the session at server side and in the application at client side are not the same, lazy load will fail with an exception.
You wrote:
"Intercepting lazy load calls", I dont think that is possible with hibernate,
but on upper layer method,you can do this:
boolean loaded = false;
List list;
public List getList() {
if (!loaded) {
// Create a query to load the list from server
// Server sents you the list
// Set the returned list as this object list,
// set 'loaded' to true.
}
return list;
}
I dont think that this will add you improvement so much until this getList method is called so rarerly, go with lazy="false"
_________________ -developer
|