This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes getTransactionIsolation() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "getTransactionIsolation()" Watch "getTransactionIsolation()" New topic


Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
I'm going through a JDBC code,where i come across

int i = Connection conn.getTransactionIsolation();

I went through google search for getTransactionIsolation() but the explanation was tough for me to understand.

Request guidance in simple terms on what does getTransactionIsolation() mean?

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 43399
In SQL you are allowed to restrict reading between transactions, and the isolation level determines how strict that restriction is. In uncommitted, which is the lowest level, you are permitted to read data while updates are in progress, and it is possible to have old data in part of the result and new data in other parts, and the two halves to be inconsistent with each other. Serializable in the highest level of restriction. I think you might find this Wikipedia page of use.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: getTransactionIsolation()
It's not a secret anymore!