Hi..
I had faced a similiar problem...
What happens is that whenever you load an object it loads the object into
the cache..
> castor log: Castor: Loading myapp.ClassB (6)
now when u update the data it updates its cache as well as the database
now u load the class A
> castor log: Castor: Loading myapp.ClassB (6)
> castor log: Castor: Loading myapp.ClassA (1)
it finds that the class A has a reference to class B
[in LockEngine] however it finds that the object is lying there in the
cache.. so it marks it as dirty...
after this if you try to load the class B... the same instance of the
class is loaded and if u try updating it... it shouts that the data is
dirty...
hope that answers yor query...
fasih
---------------------------------------------------
The happiest miser on earth is the man
who saves up every friend he can make
- GB Shaw
---------------------------------------------------
On Mon, 19 Jan 2004, Stefan Sayk wrote:
> Hi,
> I have a little problem with the caching of castor:
>
> There are two classes ClassA and ClassB both have a 1:1 relation
> (ClassA.getClassB()). Both classes implements the timestampable interface
> (for long transactions).
>
> Now I load ClassB from the database, modify something and update the data.
> => OK
>
> castor log: Castor: Loading myapp.ClassB (6)
>
> Then I load ClassA with the reference to ClassB
>
> castor log: Castor: Loading myapp.ClassB (6)
> castor log: Castor: Loading myapp.ClassA (1)
>
> If I now load ClassB from the database, modify something and update the
> data. => NOK!!!
>
> I got a org.exolab.castor.jdo.ObjectModifiedException: Timestamp mismatched!
>
> Was there build a new instance when ClassA load ClassB as a reference? Where
> in castor code is the decision: �Load object from cache or load object from
> database�?
>
> Database -> TransactionContext -> LockEngine -> Molder???
>
> Stefan
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev