Brandon, I don't think your last answer is helping him. Because in
this case he needs the transaction for the isolation and he is on the
right track already.

By querying for the entity by ID "sameKey" in Servlet B the
transaction is pinned to that entity group and therefore the
transaction is effectively temporarily placed on hold from the moment
of the query operation till the completion of the other transaction.
See 
http://code.google.com/intl/nl/appengine/docs/java/datastore/transactions.html#Uses_for_Transactions

Of course a makePersistent call is needed thus
  if( persistme != null ){
      persistme.changeSomeValue();
      pm.makePersistent( persistme );
  }

Erwin

On 27 apr, 16:58, Brandon Donnelson <[email protected]> wrote:
> Hmm, let see if I can convert my thought into words :).
>
> To persist is to update or insert automatically, depending on if the ID
> already exists in the datastore for the object. So persist method figures
> out insert or update.
>
> You can do things after commit, but you won't be able to roll back. You
> don't have to use a transaction, but a transaction will keep track what
> happens, so if a fail happens at the last moment, you can roll back to the
> original record/object that exist before you started the transaction. You
> don't have to persist in a transaction, but if you do, you have the option
> to roll back on a failure.
>
> Hope that helps?
> Brandon Donnelsonhttp://gwt-examples.googlecode.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to