Hi!

I have implemented my proposition, even simpler.

Regards,
  Oleg

On Sunday 15 September 2002 00:02, Oleg Nitz wrote:
> Hi!
>
> Max Rydahl Andersen wrote:
> > >    TX1 - materializes object and obtains write lock
> > >    TX1 - deletes object and commits
> > >    TX1 - releases write lock  <--(!)
> > >    TX2 - materializes same object and obtains read lock
> >
> > As I understand correctly it creates a new object, it does not reuse the
> > object from the cache, right ?
> >
> > >    TX2 - OJB mistakingly marks it as 'new' because TX1 deleted it from
> >
> > database.
> >
> > How about having the cache (or some other object) keep track on what have
> > been deleted in the transactions that is currently active or haven been
> > active in the lifetime of the current transactions ?  But I do not know
> > if this is a sound design - but it seem to me it could solve this actual
> > usecase....
>
> Another solution is to keep track of the loaded objects:
> if the object was NOT loaded in the Tx and doesn't exist in the database,
>     then it must be created
> if the object was loaded in the Tx and doesn't exist in the database,
>     then it was removed by a concurrent transaction and shouldn't be
> created
>
> This seems to solve the usecase as well...
>
> Oleg


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to