Answer the question
In order to leave comments, you need to log in
Transactions in Google AppEngine storage, how to bypass the restriction?
I'm trying to work with Java JDO, but as I understand it, the problem is in the datastore itself. Due to a bunch of restrictions on the structure of the database and the use of transactions, it becomes necessary to create transactions for at least some objects, the structure of which can be made intentionally simple.
The task is actually a little different:
Simplified example:Those. in this example, in terms of the GAE datastore, the root object can become inherited and vice versa. Established 'relationships' do not allow (more precisely, I failed) to move Item instances between different Users (even if you call pm.makePersistent after each change...) although they are supported, although it’s not a problem to start your own counter ... almost), since there is no other way to find out what identifier the system issued to a new object until it is saved or pm.close().
There are 2 types of objects - User {id,name} and Item {id,name,user_owner:nullable}, the relationship between them is One-to-Many, while there may be instances of the Item object that do not belong to anyone. Item instances can move between different Users
For example, in the above example:
It is possible to create a fictitious instance of the User object for the 'nobody' Item.
Accordingly, blocking can be carried out only on access to User objects
. Naturally, it may be necessary to block access to several User instances at once within one transaction.
For example, when moving an Item Between different Users, you can first block access to these Users and then carry out the move, respectively, assigning 'free' Items or 'release' busy ones, you get exactly the same task.
Answer the question
In order to leave comments, you need to log in
Your situation is strange. Perhaps you should contact Google support, they respond quickly. Or use memcache.
Why don't you want to use JPA? The standard implements a good transaction management model, and since Google supports JPA, or rather implements it, it seems like everything should be in order?
You can already see for yourself that there are serious problems with storage in GAE, the complexity of which grows with the complexity of the project.
Therefore, I advise you to simply leave GAE for simple tasks and abandon it, and use a normal Java platform on shared hosting for your project.
The time you save by not solving problems you don't need can pay for hosting many, many times over.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question