Types of isolation levels that J2EE supports

Explain the types of isolation levels that J2EE supports.

TRANSACTION_READ_UNCOMMITTED:
A static final variable / constant that specifies the non-repeatable reads, dirty reads and phantom reads occurrences. This allows a specific row that is changed by one of the transactions to be read by another specific transaction well before the changes in that row have been committed. In case of any roll backs, an invalid row will be retrieved by the second transaction.

TRANSACTION_READ_COMMITTED:
A static final variable / constant that specifies the prevention of the dirty reads, non-repeatable reads and phantom reads occurrences.

TRANSACTION_REPEATABLE_READ:
A static final variable / constant that specifies the prevention of dirty reads and non-repeatable reads and the occurrences of phantom reads.

The level indicates the prohibitions of reading a row with uncommitted changes in it, and also indicates the prohibition in specific situations where one transaction reads a row, a second transaction alters the row and the first transaction rereads the row.

TRANSACTION_SERIALIZABLE:
A static final variable / constant that indicates the prevention of dirty reads, non-repeatable reads and phantom reads. This includes the prohibitions in TRANSACTION_REPEATABLE_READ.

It further prohibits the following situations :

1. First transaction reads all rows that satisfy a WHERE condition
2. A second transaction that inserts rows that satisfies the WHERE condition and
3. First transaction rereads for the same condition, retrieving the additional phantom row in the second read.

Explain the types of isolation levels that J2EE supports.

Isolation Levels describes the degree to which the data being updated is visible to other transactions. There are 4 types of isolation levels supported by J2EE described as follows:

TRANSACTION_READ_UNCOMMITTED:
A static final variable / constant specifies the non-repeatable reads, dirty reads and phantom reads occurrences. This allows a specific row that is changed by one of the transactions to be read by another specific transaction well before the changes in that row have been committed. In case of any roll backs, an invalid row will be retrieved by the second transaction.

TRANSACTION_READ_COMMITTED:
A static final variable / constant that specifies the prevention of the dirty reads, non-repeatable reads and phantom reads occurrences.

TRANSACTION_REPEATABLE_READ:
A static final variable / constant that specifies the prevention of dirty reads and non-repeatable reads and the occurrences of phantom reads.

The level indicates the prohibitions of reading a row with uncommitted changes in it, and also indicates the prohibition in specific situations where one transaction reads a row, a second transaction alters the row and the first transaction rereads the row.

TRANSACTION_SERIALIZABLE:
A static final variable / constant that indicates the prevention of dirty reads, non-repeatable reads and phantom reads. This includes the prohibitions in TRANSACTION_REPEATABLE_READ.

It further prohibits the following situations:

1. First transaction reads all rows that satisfy a WHERE condition
2. A second transaction that inserts rows that satisfies the WHERE condition and
3. First transaction rereads for the same condition, retrieving the additional phantom row in the second read.
Types of concurrency issues - JTS
Types of concurrency issues - Dirty reads issue is as follows: First transaction is reading the uncommitted changes which are performed by a second transaction. ..
Explain the categories of exceptions in EJB
Categories of exceptions in EJB - Application Exception: This is one of the exceptions which was declared on the method signature..
What are the advantages of JTA over JTS?
Advantages of JTA over JTS - Java Transaction API provides simple and flexible environment for the developer. It offers high-level X / Open Call Level Interface and low-level XA Call Level Interface..
Post your comment