Skip to content

Commit

Permalink
feature: add TCC three-phase hooks (apache#6731)
Browse files Browse the repository at this point in the history
  • Loading branch information
chengliefeng committed Aug 27, 2024
1 parent a2ebc11 commit 6b2c5c6
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@ private void doBeforeTccPrepare(String xid, String branchId, String actionName,
return;
}
for (TccHook hook : hooks) {
try {
hook.beforeTccPrepare(xid, Long.valueOf(branchId), actionName, context);
} catch (Exception e) {
LOGGER.error("Failed execute beforeTccPrepare in hook {}", e.getMessage(), e);
}
hook.beforeTccPrepare(xid, Long.valueOf(branchId), actionName, context);
}
}

Expand All @@ -157,11 +153,7 @@ private void doAfterTccPrepare(String xid, String branchId, String actionName, B
return;
}
for (TccHook hook : hooks) {
try {
hook.afterTccPrepare(xid, Long.valueOf(branchId), actionName, context);
} catch (Exception e) {
LOGGER.error("Failed execute afterTccPrepare in hook {}", e.getMessage(), e);
}
hook.afterTccPrepare(xid, Long.valueOf(branchId), actionName, context);
}
}

Expand Down

0 comments on commit 6b2c5c6

Please sign in to comment.