File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

isolation level

 
binu sukumar
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a java pgm using jdbc connection , I insert a record into DB , and then read the inserted data. AutoCommit is set to false for the connection. Isolation level is set to READ_COMMITTED using the method con.setIsolationLevel().
In this case, it should not be possible to read uncommited data.
But this is not working as intended.
Any idea, why ??
 
Thomas Kyte
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the database, you can always see your changes. The isolation levels are there to isolate you from OTHER sessions, not yourself.
So, you can see your uncommitted changes regardless of the isolation level.
If you are using Oracle and need to see the values in the database without seeing your changes, you can use an autonomous transaction to open a ref cursor (result set from a stored procedure). These result set will be opened as if it were another session all together and will not see your changes.
 
binu sukumar
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the info !

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic