public class SharedTxChangeProcessStrategy extends AbstractChangeProcessStrategy<TransactionalTargetSystemOps>
This strategy is used when the target system and audit store share the same database and can participate in the same transaction.
When execution fails, this strategy attempts to create a detailed failure audit trail in a separate transaction: STARTED → EXECUTION_FAILED → ROLLED_BACK. This provides comprehensive failure information while maintaining the safety guarantee that failed changes can be safely retried since nothing was committed in the original transaction.
auditStoreOperations, change, executionContext, resultBuilder, stepLogger, targetSystemOps, timeService| Constructor and Description |
|---|
SharedTxChangeProcessStrategy(ExecutableTask change,
ExecutionContext executionContext,
TransactionalTargetSystemOps targetSystemOps,
AuditStoreStepOperations auditStoreOperations,
ChangeResultBuilder resultBuilder,
LockGuardProxyFactory proxyFactory,
io.flamingock.internal.common.core.context.ContextResolver baseContext,
io.flamingock.internal.util.TimeService timeService) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
auditAndLogAutoRollback() |
protected ChangeProcessResult |
doApplyChange()
Strategy-specific implementation of change application.
|
applyChange, auditAndLogAutoRollback, auditAndLogExecution, auditAndLogManualRollback, auditAndLogStartExecution, buildExecutionRuntimepublic SharedTxChangeProcessStrategy(ExecutableTask change, ExecutionContext executionContext, TransactionalTargetSystemOps targetSystemOps, AuditStoreStepOperations auditStoreOperations, ChangeResultBuilder resultBuilder, LockGuardProxyFactory proxyFactory, io.flamingock.internal.common.core.context.ContextResolver baseContext, io.flamingock.internal.util.TimeService timeService)
protected ChangeProcessResult doApplyChange()
AbstractChangeProcessStrategyConcrete strategies must implement this method to define their specific transaction handling, execution flow, and error recovery patterns.
doApplyChange in class AbstractChangeProcessStrategy<TransactionalTargetSystemOps>protected void auditAndLogAutoRollback()