How does one manage concurrency issues with JDBC?
Location: http://www.jguru.com/faq/view.jsp?EID=59102 Created: May 29, 2000 Modified: 2000-05-29 02:57:01.45 Author: Joe Sam Shirah (http://www.jguru.com/guru/viewbio.jsp?EID=42100) Question originally posed by Richard Goh Muk Ling (http://www.jguru.com/guru/viewbio.jsp?EID=18858 JDBC is based on ISO-ANSI SQL, which provides for database concurrency using isolation levels. These are defined to deal with the “phonema” of dirty reads, non-repeatable reads and phantom inserts. “The four isolation levels guarantee that each SQL-transaction will be executed completely or not at all, and that no updates will be lost.” While almost all programs will be concerned with dirty reads, in the real world we probably want to use and see the most current data, so non-repeatable reads and phantom inserts may not be an issue. Here’s a table that briefly summarizes what the defined isolation levels guarantee: Isolation Level Dirty Read Non-Repeatable Read Phantom Insert Read Uncommitted Possible Possible