what is meant by Transaction Isolation Levels?

Answer Posted / shraddha

Connection.setTransactionIsolation (level)

TRANSACTION_READ_UNCOMMITTED Allows dirty reads, non-
repeatable reads, and phantom reads to occur.

TRANSACTION_READ_COMMITTED Ensures only committed data
can be read.

TRANSACTION_REPEATABLE_READ Is close to
being "serializable," however, "phantom" reads are possible.

TRANSACTION_SERIALIZABLE Dirty reads, non-repeatable
reads, and phantom reads are prevented. Serializable.


A "phantom" read occurs when one transaction reads all rows
that satisfy a WHERE condition, and a second transaction
inserts a row that satisfies that WHERE condition, the
first transaction then rereads for the same condition,
retrieving the additional "phantom" row in the second read.

In addition, JDBC defines an additional constant,
TRANSACTION_NONE, which is used to indicate that the driver
does not support transactions.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between PrintWriter and ServletOutputStream?

771


Explain their methods? Tell me their parameter names also have you used threads in servlet?

584


What are the uses of servlets?

622


How can you start a jta transaction from a servlet deployed on jboss?

675


What are the type of protocols used in httpservlet?

612






What is a deployment descriptor?

600


How do we share data using 'getservletcontext ()?

543


Tell the new features added in servletrequest interface i.e. Servlet 2.4

574


What is the use of servlet wrapper classes?

673


What is getservletcontext?

552


How can the referrer and the target urls be used in servlet?

534


How to generate the server side programming and the advantages of it over the other languages?

563


What is new in ServletRequest interface ? (Servlet 2.4)

577


Explain the differences between jsp and servlet.

545


Can you use javascript in servlets?

603