Types of concurrency issues - JTS

Explain the types of concurrency issues in the transaction processing that isolation levels attempt to address.

Dirty reads issue is as follows:
First transaction is reading the uncommitted changes which are performed by a second transaction. In this scenario , if the second transaction is rolled back, the data read by the first transaction becomes invalid. The reason is, the roll back does not make any changes, and the first transaction is unaware about the roll back done by the second transaction.

Phantom reads issue is as follows:
A new record is added to a database. A transaction started before the insertion, so this record can be detectable by this transaction. After starting the other transaction, the queries will include records added. In this situation the record inserted / added is a phantom record.

Unrepeatable reads issue is as follows:
A component which finds its previously read data which is being modified by other component. The problem of appearing a new set of data in a database between 2 database operations.

Explain the types of concurrency issues in the transaction processing that isolation levels attempt to address.

Types of concurrency issues that can be handled by isolation levels in J2EE are:

Dirty reads issue:
First transaction is reading the uncommitted changes which are performed by a second transaction. In this scenario, if the second transaction is rolled back, the data read by the first transaction becomes invalid. The reason is, the roll back does not make any changes, and the first transaction is unaware about the roll back done by the second transaction.

Phantom reads issue:
A new record is added to a database. A transaction started before the insertion, so this record can be detectable by this transaction. After starting the other transaction, the queries will include records added. In this situation the record inserted / added is a phantom record.

Unrepeatable reads issue:
A component which finds it’s previously read data which is being modified by other component.
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..
How JTS solves the problems encountered by distributed objects
How JTS solves the problems encountered by distributed objects - The transactional semantics participation into object oriented components needs an extension of the Transaction Control Model..
Post your comment