aspose file tools*
The moose likes JDBC and the fly likes Question about TRANSACTION SERIALIZABLE... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Question about TRANSACTION SERIALIZABLE..." Watch "Question about TRANSACTION SERIALIZABLE..." New topic
Author

Question about TRANSACTION SERIALIZABLE...

SAFROLE YUTANI
Ranch Hand

Joined: Jul 06, 2001
Posts: 257
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
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about TRANSACTION SERIALIZABLE...
 
Similar Threads
Transactions between DAO and Entity Bean
about setTransactionIsolation() method
Select query not working with Jdbc for transactional calls.
Database Updates in EJB method
how to do transaction management?