Skip to content
Snippets Groups Projects
Commit 4fd689f3 authored by Goik Martin's avatar Goik Martin
Browse files

Set transaction isolation level to "serializable"

parent bdc873ca
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ public class DbHandler {
Conf.get("DbHandler.user"),
Conf.get("DbHandler.password"));
conn.setAutoCommit(false);
conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
updateAccount = conn.prepareStatement("UPDATE Account SET balance = balance + ? WHERE number = ?");
log.info("Connection '" + getConnectionName() + "' established" );
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment