Method setMethod = clazz.getDeclaredMethod("setCheckedAction", CheckedAction.class);
checkedActionField.setAccessible(true);
setMethod.setAccessible(true);
CheckedAction oldCheckedAction = (CheckedAction) checkedActionField.get(currentTx);
setMethod.invoke(currentTx, newCheckedAction);
return oldCheckedAction;
} catch (Exception e) {
LOG.warn("failed to set a new CheckedAction on the current tx: " + e);