I am writing a java application on Google App Engine(GAE) using objectify for datastore interface. I need to use transaction to make sure some of the operations in my app are atomic. But I am confused about granularity of the database transaction i.e. if I am using a particular entity object in a transaction in a thread then which one of the following is true ? :-
1) Can I use some other object of the same entity in a transaction in a different thread concurrently ?
2) OR, Is it that at a time I can be making changes to only one object of a particular entity type
If (2) is true, then what should I do if I expect to have multiple request to be coming for updating a particular entity type even though they will be for different objects under that entity type ?
Thanks…
See the section on Optimistic Concurrency here:
https://code.google.com/p/objectify-appengine/wiki/Concepts#Transactions