Hi Sven,

Efftinge, Sven wrote:
Hi,
I've got another question:
I'm using the attribute proxy="true" for reference-descriptor and
collection-descriptor.
And I have three classes A,B,C where C has Bs and B has As
A,B and C all implement their interfaces.
Ok, I have these Objects
A with attributes
id=1 Bid=2

B with attributes
id=2
Cid=3

C object with id 3 doesn't exist

when I load B it results in an error, what I expected. when I load A I got the same error!
OJB broker could not materialize C{3}
This message is posted in o.a.ojb.broker.accesslayer.IndirectionHandler.materializeSubject()

This method is invoked only if a user invokes methods on the proxy instance. The proxy then materializes the real subject (in your case the C{3} instance) and delegates the method call to this instance.

I think this it's not the expected behaviour of an Proxy, to load his
references?
As explained: the materialization is triggered by message invocations on the proxy instance.

Is it a configurationerror?
No, this is the expected behaviour. Proxies don't prevent loading of instances. They only defer it to the latest possible time. That's why this approach is aka "lazy loading".

cheers,
Thomas

Sven


--
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