Tweak factory lifecycle handling

- Setup autostart and afterPropertiesSet() for distributed machine.
This commit is contained in:
Janne Valkealahti
2015-07-11 16:08:41 +01:00
parent 087da55cbb
commit 48bb6631f9

View File

@@ -213,6 +213,8 @@ public abstract class AbstractStateMachineFactory<S, E> extends LifecycleObjectS
if (stateMachineConfigurationConfig.getStateMachineEnsemble() != null) {
DistributedStateMachine<S, E> distributedStateMachine = new DistributedStateMachine<>(
stateMachineConfigurationConfig.getStateMachineEnsemble(), machine);
distributedStateMachine.setAutoStartup(stateMachineConfigurationConfig.isAutoStart());
distributedStateMachine.afterPropertiesSet();
machine = distributedStateMachine;
}