This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC Connection Isolation level query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Connection Isolation level query" Watch "JDBC Connection Isolation level query" New topic
Author

JDBC Connection Isolation level query

Raga Baskaran
Greenhorn

Joined: Sep 16, 2010
Posts: 3
Hi,

What is the default isolation level of a JDBC connection, Is it dependent on the database driver/ database type we use or can it be controlled programmatically ?


Regards.
K Abhijit
Ranch Hand

Joined: Mar 03, 2008
Posts: 88
refer this thread for details-
http://www.coderanch.com/t/306014/JDBC/java/JDBC-Isolation-level


Well not all Isolation levels are supported by all Vendors.....

1. we have methods to check if the particular isolation level is supported or not
2. We can change the run time isolation level.



Also it depends on vendor :: for Oracle default level which get set is TRANSACTION_READ_COMMITED
but when Googled, I found few contradictory statements:

Best way is find out you self: we have API to find it out
http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html
getDefaultTransactionIsolation

This may vary
JDBC :
A. vendor to verndor in (oracle / sql servers / mysql / (Pure Java running outside App servers)
B. JDBC running inside App Containers (websphere / Bea ...) (if App container Vendor tries to override default level set by Database Driver Vendor )

JTA -
a. App Containers level (Websphere / Bea ...)

Also please do share your observation/results




“The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'.”
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Connection Isolation level query
 
Similar Threads
Data updated through stored proc is not retrieved by subsequent em.find() calls
transaction isolation
Setting BEA Transaction isolation level
JDBC Isolation level?
Dirty read (?) problem