Hi Will,

I have checked in a test case to reproduce
your problem. See CollectionsTest.java.
The test is passed, please have a look at it. 

> have a web application, so let's say the user chooses a Trainee and
> clicks Delete. The action does the following, each in a separate ODMG
> transaction.
>
> - (the Faculty object has previously been retreived and put into the
> session.)
> - get the Trainee object using the OID, delete the trainee (both in
one tx)
you have to reset the Trainee List in Faculty and lock this too,
because the Faculty object in the cache could not know (or say
we do not have such a sophisticated cache implementation ;-))
that one of the references was deleted.
When using the ObjectCacheEmptyImpl this could not
happen, then every object was retrieved from the DB.

If the test case does not reproduce you problem could
you please post me a modified version?

HTH

regards,
Armin


> - get the Faculty object using the OID
>
> I then put the Faculty into the sessions and use its trainee
collection
>   to populate a dropdown box of Trainees. What happens is that the
> deleted trainee continues to appear in the list. Via debugging I can
see
> that the Faculties trainee collection still has the deleted trainee.
>
> It seems that the Faculty object is always gotten from the cache and
> never from the db, so the Trainee collection is wrong. I have to
restart
> my application server in order for the correct collection to show.
>
> This make so sense to me. Clearly I'm not understanding the cache.
>
> Will
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to