wood burning stoves 2.0
The moose likes EJB and other Java EE Technologies and the fly likes Transaction Isolation Levels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction Isolation Levels" Watch "Transaction Isolation Levels" New topic

Transaction Isolation Levels

Kapil Keskar
Ranch Hand

Joined: Dec 04, 2001
Posts: 47
Recently in one of interview i faced on ejb technology. They have asked me about transaction isolation levels. I have told them about about the security issues like - relamtool -add user
& also about ACID properties Isolation property.
Can any body tell me what it is?
& what are they?
J You

Joined: Jul 31, 2001
Posts: 29
This is a Database transaction thing.You can find
some info from the JDBC tutorial in the SUN JAVA
Milind V. Kulkarni

Joined: Apr 12, 2002
Posts: 17
The isolation level measures concurrent transactions' capacity to view data that have been updated, but not yet committed, by another transaction.
ReadUncommitted: Data that have been updated but not yet committed by a transaction may be read by other transactions.
ReadCommitted: Only data that have been committed by a transaction can be read by other transactions.
RepeatableRead: Only data that have been committed by a transaction can be read by other transactions, and multiple reads will yield the same result as long as the data have not been committed.
Serializable: This, the highest possible isolation level, ensures a transaction's exclusive read-write access to data. It includes the conditions of ReadCommitted and RepeatableRead and stipulates that all transactions run serially to achieve maximum data integrity. This yields the slowest performance and least concurrency. The term serializable in this context is absolutely unrelated to Java's object-serialization mechanism and the java.io.Serializable interface.

Sheetal Engineer

Joined: May 21, 2002
Posts: 4
Isolation level represents how database maintains data integrity due to the problems like dirty reads, non-repeatable reads and phantom reads which can occur due to concurrent transactions. Following four transaction levels are defined in java.sql.Connection interface: TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE.
Setting the isolation level has an impact on performance. TRANSACTION_READ_UNCOMMITED is having Fastest performance but permits dirty reads, non repeatable reads and phantom reads. Whereas TRANSACTION_SERIALIZABLE is the Slowest but secures you from all the above three.
Isolation level can be set using, for example, Connection.setTransactionIsolation(). Database servers may not support all of these isolation levels. Oracle server supports only two isolation levels, TRANSACTION_READ_COMMITED and TRANSACTION_SERIALIZABLE isolation level, default isolation level is TRANSACTION_READ_COMMITED.
I agree. Here's the link: http://aspose.com/file-tools
subject: Transaction Isolation Levels
It's not a secret anymore!