No, I don't thik so, since the object is not instantiated by OJB. If I take
again the example of the Car and its Owner, the Car object is instantiated
by OJB, because the data is stored in the RDBMS and retrieved using the
PersistenceBroker.
The Owner object must be read from an external application and cannot by
retrieved by OJB. To do that, I overwrite RowReader.readObjectFrom() to add
a couple of instruction that access the external application, create the
owner instance and set it to the car.
I would like to add the owner to the OJB cache so it would be cleared at
the same time that all other objects of the application, regardless if they
have been retrieved through OJB or not.
Stefano
|---------+--------------------------->
| | Thomas Dudziak |
| | <[EMAIL PROTECTED]|
| | .de> |
| | |
| | 08.07.2004 16:14|
| | Veuillez |
| | r�pondre � "OJB |
| | Users List" |
| | |
|---------+--------------------------->
>----------------------------------------------------------------------------------------------------------------------|
|
|
| Pour : OJB Users List <[EMAIL PROTECTED]>
|
| cc :
|
| Objet : Re: R�f. : Re: Mixing OJB objects with non-OJB objects
|
>----------------------------------------------------------------------------------------------------------------------|
[EMAIL PROTECTED] wrote:
>Yes, I know that, but if I am in my custom RowReader extending
>DefaultRowReader, how can I get a reference to the PersisitenceBroker ? In
>other words, is there a way to navigate OJB from
RowReader.readObjectFrom()
>to the PersistenceBroker ?
>
>
Mhm, not directly. You could try to obtain a persistence broker instance
the normal way (e.g. standard PersistenceBroker Api) from within the row
reader, but I don't know whether that works.
Are you sure that your customly-loaded objects are not cached (I see no
reason why a custom row reader should affect the cache handling as long
as the custom objects have a valid identity) ?
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]