I know that it's possible to set the transaction isolation level on a Connection object using setTransactionIsolation(int), but I'm not clear as to what affect this has on concurrent updates to the database. Lets say that two clients are using two separate connection objects, both of which have previously called setTransactionIsolation( TRANSACTION_SERIALIZABLE). I know that setting TRANSACTION_SERIALIZABLE on a connection object should guarantee that transactions will be executed serially, such as in a sequence. But if the two previously mentioned clients both call setAutoCommit(false) on their own connection object, perform some updates to the database, then call commit(), will these transactions occur sequentially? I mean, will the transactions overlap at all? catch y'all later SAF
posted 14 years ago
I'm not so sure, but that isolation level guarantees that everytime they read something in that transaction, they will get the same results every single time. If they try to update a row that has changed since the transaction started, then the get an error. When, actually, this may depend on the implementation of the DBMS. The above is true at least for Oracle. Good luck!