On Tue, Jan 20, 2015 at 6:35 PM, Aaron Digulla <[email protected]> wrote: > What is the correct code for an application where several users can make > concurrent changes to the database? >
Regular concurrent updates are not the problem, that should work just fine. Your original test case was this: Create transaction Update the text in the single data row to foo Create a new thread Create inner transaction Update the text in the single data row to bar Commit the inner transactions Commit the outer transaction Read the value And that is going to be a problem on any database. The point is that you should not be spawning a child thread and waiting for it while you have an open transaction. You should commit the transaction before spawning the child thread. This is because while a transaction is open that table is locked. Regards, Noel -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
