mirror of
https://github.com/Example-uPagge/transactional.git
synced 2024-06-14 11:52:55 +03:00
Заменил бд на H2
This commit is contained in:
@@ -17,7 +17,7 @@ public class DirtyReadExample {
|
|||||||
connection.setAutoCommit(false);
|
connection.setAutoCommit(false);
|
||||||
connection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
|
connection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
|
||||||
|
|
||||||
statement.executeUpdate("UPDATE person SET balance = 100000 WHERE id = 1");
|
statement.executeUpdate("UPDATE person SET balance = 100000 WHERE id = 1");
|
||||||
|
|
||||||
new OtherTransaction().start();
|
new OtherTransaction().start();
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
|
|||||||
Reference in New Issue
Block a user