db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Bengtson <e...@jpox.org>
Subject Re: makePersistent detached instance deleted on database
Date Wed, 08 Mar 2006 15:41:19 GMT
Craig,

> When you invoke makePersistent on a detached instance, the instance
> must exist in the database. You don't insert it at commit.

It means, we raise an exception.

> This is
> similar to retrieving an instance in one transaction and having a
> parallel transaction delete it.

Unless you use the appropriate isolation levels for this scenario avoiding this
to happen.

Regards,

Quoting Craig L Russell <Craig.Russell@Sun.COM>:

> Hi Erik,
>
> When you invoke makePersistent on a detached instance, the instance
> must exist in the database. You don't insert it at commit. This is
> similar to retrieving an instance in one transaction and having a
> parallel transaction delete it.
>
> Craig
>
> On Mar 8, 2006, at 7:14 AM, Erik Bengtson wrote:
>
> >
> >
> > Hi,
> >
> > What happens when we invoke makePersistent on a detached instance
> > that was
> > deleted by another isolated process? I suspect that we raise an
> > exception
> > instead of reinserting it for a second time. Is that right?
> >
> > Maybe this can be clarified in the spec.
> >
> > Regards,
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>




Mime
View raw message