From fb3696bc72ce7bcbf17a5188b7fec1c5b690ad23 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 2 Oct 2006 06:08:44 +0000 Subject: Add support SNAPSHOT isolation level. --- src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/repo') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java index 6e53354..97be915 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java @@ -92,6 +92,9 @@ public class JDBCRepository return Connection.TRANSACTION_READ_COMMITTED; case REPEATABLE_READ: return Connection.TRANSACTION_REPEATABLE_READ; + case SNAPSHOT: + // TODO: not accurate for all databases. + return Connection.TRANSACTION_SERIALIZABLE; case SERIALIZABLE: return Connection.TRANSACTION_SERIALIZABLE; } @@ -117,6 +120,9 @@ public class JDBCRepository case REPEATABLE_READ: desiredLevel = IsolationLevel.SERIALIZABLE; break; + case SNAPSHOT: + desiredLevel = IsolationLevel.SERIALIZABLE; + break; case SERIALIZABLE: default: return null; } -- cgit v1.2.3