Hi,
I posted this question a while ago on StackOverflow:
https://stackoverflow.com/questions/27585579/jdo-semantics-of-deleted-objects
It didn't get answered yet.
Here is the question:
===========
I've been studying the JDO 3.0 spec and I'm not sure what the semantics
of |delete()| and |refresh()| are supposed to be.
Suppose I have two optimistic sessions, pm1 and pm2, both access the
same object. Pm1 deletes the object and commits. Then what happens in
pm2 if:
1.
pm2 deletes the object and tries to commit, should that work? It's
wouldn't be a real conflict if both delete it.
2.
pm2 modifies the object (make dirty) and calls refresh(). Should I
get an ObjectNotFound exception?
3.
pm2 deletes the object and calls |refresh()|. According to the spec,
|refresh()| should not change the object's state. But should it
still fail with |ObjectNotFound|? If refresh should fail, how can I
ever recover from such a situation, because I can't undelete the
object?
============
Could someone point me to some relevant documentation?
Should I maybe write an JIRA bug report to enhance the spec?
Cheers,
Tilmann