hi all,

the partial loading is imho not the problem.
problems arise when you try to modify and store a partially loaded object.
this should not be possible because all not loaded attributes woul be set to
null. also when reading a not loaded attribute the object should first do a
full load.
i once implemented such a mechanism, but i had a load state in the business
object that prevented updates of not fully loaded objects and managed read
access to not loaded attributes.

jakob

----- Original Message -----
From: "Matthew Baird" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 5:09 PM
Subject: RE: AW: Proxy question


> so you want a "dynamic" type proxy where you can mark each element that
should be initially loaded.
>
> example:
> <class-descriptor class='com.blah.foo">
> <table...>
> <proxy="dynamic-partial">
> <field name="id" partial-load="true"....
>
>
> Something like that? Sounds like a reasonably small project to do, and
useful too.
>
> Do I understand the problem?
>
>
>
> -----Original Message-----
> From: David Corbin [mailto:[EMAIL PROTECTED]]
> Sent: Wed 9/4/2002 7:55 AM
> To: OJB Users List
> Cc:
> Subject: Re: AW: Proxy question
>
>
>
> Mahler Thomas wrote:
>
> >Hi,
> >
> >I was just describing what I consider best practise.
> >I did not know you were looking for the Holy Grail ;-)
> >
> >
> You don't think having the holy grail would be a best practice in of
itself?
>
> >So you need a partially loading proxy?
> >OK here you go:
> >take a look at tutorial3.html:
> >http://jakarta.apache.org/ojb/tutorial3.html#using%20proxy%20classes
> >
> >
> I've seen that.  I suppose, by adding another class-descriptor for the
> CustomerProxy object, you could load the partial data, and non-loaded
> data could continue to proxy the way it "normally does".  It just
> strikes me as a useful design/approach (maybe not - maybe I haven't been
> bitten enough by proxy problems).  Useful enough, that someway to make a
> dynmaic "half-proxy" would have broad appeal.  Perhaps not.  (I haven't
> looked at how dynamic proxies are implemented).
>
> >As you can see it is possible to use either dynamic proxies (that are
> >generated automatically at runtime) or manually implemented proxies.
> >You can provide your own proxy implementation that performs any kind of
> >partial loading.
> >You have to tell OJB about this proxy in the class-descriptor for your
> >Customer class:
> ><class-descriptor
> >      class="com.my.Customer"
> >      proxy="com.my.CustomerProxy"
> >      table="CUSTOMERS"
> >
> >
> >
> >cheers,
> >Thomas
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>







--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to