Hi Tony,

I presume that you have studied the GAE/J documentation about datastore
transactions at

 
"http://code.google.com/intl/en/appengine/docs/java/datastore/transactions.html";.


In particular, I note:

"JDO performs all actions between the call to tx.begin() and the call to
tx.commit() in a single transaction. If any action fails due to the
requested entity group being in use by another process, JDO throws a
JDODataStoreException or a JDOException, cause by a
java.util.ConcurrentModificationException."


In essence, let the JDO transaction do all the work for you! This should
help you in the case where a maximum of one thread (= request) only is
allowed to update persistent data at any time. All you will need to do then
(apart from thinking though your design) is to handle the exceptions
mentioned properly.

Cheers,

Ian


Anton Veretennikov wrote:
> 
> Thank you very much, Ian, you clarified some things to me.
> 
> I'm trying to block some entity got for processing by one session from
> other
> possibly concurrent session.
> I know what i would do if it were RDBMS: lock my object with "FOR UPDATE",
> if success, i would check if status field is still what i assume it must
> be
> and then update it to new status.
> 
> But i'm not sure yet how to do this in GAE.
> 
> -- Tony
> 
-- 
View this message in context: 
http://old.nabble.com/Wicket-GAE-performance-tp28118591p28149943.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to