viadeo / kasper-framework

Kasper is the treasure keeper
http://kasper-doc.viadeo.com/kasper-framework/latest/
GNU Lesser General Public License v3.0
9 stars 6 forks source link

[saga] added MeasuredSagaExecutor #357

Closed cmurer closed 8 years ago

cmurer commented 8 years ago

ping @frobini, once you find that this work answer to your expectation then you can merge it. you should just rebuild the platform without cache in order to retrieve framework dependencies.

After you need into viadeo-platform override the bean SagaManager in the spring configuration PlatformSagaConfiguration as follow:

@Bean
    public SagaManager sagaManager(final MetricRegistry metricRegistry, final SagaFactoryProvider sagaFactoryProvider, final SagaRepository repository, final StepProcessor operationProcessor) {
        return new SagaManager(sagaFactoryProvider, repository, operationProcessor) {
            @Override
            protected <SAGA extends Saga> SagaExecutor<SAGA> createSagaExecutor(Class<SAGA> sagaClass, SagaFactory factory, Set<Step> steps) {
                return new MeasuredSagaExecutor<>(metricRegistry, sagaClass, steps, factory, repository);
            }
        };
    }