Commit 26e5d3c
Wrap async event bus publish in ManagedContextRunnable for DB connection safety
The sole subscriber (ApiServer.handleAsyncJobPublishEvent) performs DAO reads
(getUserIncludingRemoved, getAccount, findById) inside its callback.
Without ManagedContextRunnable, the EventBus thread would not have proper
TransactionLegacy lifecycle management, risking DB connection leaks.1 parent 68c69df commit 26e5d3c
File tree
1 file changed
+7
-3
lines changed- framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl
1 file changed
+7
-3
lines changedLines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
1406 | 1410 | | |
1407 | 1411 | | |
1408 | 1412 | | |
| |||
0 commit comments