Hi.

I'm debugging an issue where we have an application which both uses 
READ_COMITTED and SERIALIZABLE.

In an integration testing scenario we pull up the entire application and 
start execute commands at it. Some of them will use READ_COMITTED and some 
SERIALIZABLE. It appears to me that H2 will set the isolation level 
globally and not per connection? Is this by design?

Here's a sample code:

var driver = new Driver();
Connection con1 = driver.connect("jdbc:h2:/tmp/h2-test;AUTO_SERVER=TRUE", 
null);
Connection con2 = driver.connect("jdbc:h2:/tmp/h2-test;AUTO_SERVER=TRUE", 
null);
con1.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
con2.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
System.out.println(con1.getTransactionIsolation()); // Outputs 2. Should 
output 8?
System.out.println(con2.getTransactionIsolation()); // Outputs 2

Thanks!

/Knut

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/7f72248e-a162-4fbd-bc00-1455b8e6f887n%40googlegroups.com.

Reply via email to