projects
/
JavaForFun
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e854fe
)
Data base deadlocks. How to deal with them (retries)
author
gu.martinm@gmail.com
<gu.martinm@gmail.com>
Fri, 10 Oct 2014 17:32:29 +0000
(19:32 +0200)
committer
gu.martinm@gmail.com
<gu.martinm@gmail.com>
Fri, 10 Oct 2014 17:32:29 +0000
(19:32 +0200)
SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/FirstTransaction.java
patch
|
blob
|
history
SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/SecondTransaction.java
patch
|
blob
|
history
diff --git
a/SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/FirstTransaction.java
b/SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/FirstTransaction.java
index
23d72a5
..
5370788
100644
(file)
--- a/
SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/FirstTransaction.java
+++ b/
SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/FirstTransaction.java
@@
-49,8
+49,6
@@
public class FirstTransaction {
}
this.trx1Gate.close();
- trx2Gate.open();
-
this.doThirdStep();
logger.info("End doFirstStepWithGate");
diff --git
a/SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/SecondTransaction.java
b/SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/SecondTransaction.java
index
2dd9631
..
1d059f2
100644
(file)
--- a/
SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/SecondTransaction.java
+++ b/
SpringJava/DeadLocksSQL/src/main/java/de/example/sql/deadlocks/example/SecondTransaction.java
@@
-50,15
+50,6
@@
public class SecondTransaction {
// trx1 continue
trx1Gate.open();
- try {
- this.trx2Gate.await();
- } catch (InterruptedException e) {
- logger.warn("interrupt error", e);
-
- Thread.currentThread().interrupt();
- }
- this.trx2Gate.close();
-
this.doFourthStep();
logger.info("End doSecondStepWithGate");