Examples of CurrentExecutionContext


Examples of com.codebullets.sagalib.context.CurrentExecutionContext

    private void handleSagaMessage(final Object invokeParam) throws InvocationTargetException, IllegalAccessException {
        Collection<SagaInstanceDescription> sagaDescriptions = env.sagaFactory().create(invokeParam);
        if (sagaDescriptions.isEmpty()) {
            LOG.warn("No saga found to handle message. {}", invokeParam);
        } else {
            CurrentExecutionContext context = env.contextProvider().get();
            context.setMessage(invokeParam);
            setHeaders(context);

            try {
                moduleStarts(context);
View Full Code Here

Examples of com.codebullets.sagalib.context.CurrentExecutionContext

    private void handleSagaMessage(final Object invokeParam) throws InvocationTargetException, IllegalAccessException {
        Collection<SagaInstanceDescription> sagaDescriptions = sagaFactory.create(invokeParam);
        if (sagaDescriptions.isEmpty()) {
            LOG.warn("No saga found to handle message. {}", invokeParam);
        } else {
            CurrentExecutionContext context = contextProvider.get();
            context.setMessage(invokeParam);

            for (SagaInstanceDescription sagaDescription : sagaDescriptions) {
                Saga saga = sagaDescription.getSaga();
                context.setSaga(saga);
                setSagaExecutionContext(saga, context);

                invoker.invoke(saga, invokeParam);
                updateStateStorage(sagaDescription);

                if (context.dispatchingStopped()) {
                    LOG.debug("Handler dispatching stopped after invoking saga {}.", sagaDescription.getSaga().getClass().getSimpleName());
                    break;
                }
            }
        }
View Full Code Here

Examples of com.codebullets.sagalib.context.CurrentExecutionContext

        }
    }

    private void executeMessage(final Object invokeParam, final Iterable<SagaInstanceDescription> sagaDescriptions)
            throws InvocationTargetException, IllegalAccessException {
        CurrentExecutionContext context = env.contextProvider().get();
        context.setMessage(invokeParam);
        setHeaders(context);

        try {
            moduleStarts(context);
            invokeSagas(context, sagaDescriptions, invokeParam);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.