mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
* ENT-6584: Move sending of events to finally block. This makes sure it gets executed in event of an exception.
This commit is contained in:
@ -112,8 +112,6 @@ class DatabaseTransaction(
|
|||||||
} finally {
|
} finally {
|
||||||
clearException()
|
clearException()
|
||||||
contextTransactionOrNull = outerTransaction
|
contextTransactionOrNull = outerTransaction
|
||||||
}
|
|
||||||
|
|
||||||
if (outerTransaction == null) {
|
if (outerTransaction == null) {
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
closed = true
|
closed = true
|
||||||
@ -121,6 +119,7 @@ class DatabaseTransaction(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun onCommit(callback: () -> Unit) {
|
fun onCommit(callback: () -> Unit) {
|
||||||
boundary.filter { it.success }.subscribe { callback() }
|
boundary.filter { it.success }.subscribe { callback() }
|
||||||
|
Reference in New Issue
Block a user