Examples of UnitOfWorkProcessor


Examples of org.apache.camel.processor.UnitOfWorkProcessor

        // now lets turn all of the event driven consumer processors into a single route
        if (!eventDrivenProcessors.isEmpty()) {
            Processor target = Pipeline.newInstance(getCamelContext(), eventDrivenProcessors);

            // and wrap it in a unit of work so the UoW is on the top, so the entire route will be in the same UoW
            UnitOfWorkProcessor unitOfWorkProcessor = new UnitOfWorkProcessor(this, target);

            // and then optionally add route policy processor if a custom policy is set
            RoutePolicyProcessor routePolicyProcessor = null;
            List<RoutePolicy> routePolicyList = getRoutePolicyList();
            if (routePolicyList != null && !routePolicyList.isEmpty()) {
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

     */
    protected Processor createConsumerProcessor(final Object pojo, final Method method, final Endpoint endpoint) {
        BeanProcessor answer = new BeanProcessor(pojo, getCamelContext());
        answer.setMethodObject(method);
        // must ensure the consumer is being executed in an unit of work so synchronization callbacks etc is invoked
        return new UnitOfWorkProcessor(answer);
    }
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

        }

        Processor childProcessor = this.createChildProcessor(routeContext, true);

        // wrap the on completion route in a unit of work processor
        childProcessor = new UnitOfWorkProcessor(routeContext, childProcessor);

        Predicate when = null;
        if (onWhen != null) {
            when = onWhen.getExpression().createPredicate(routeContext);
        }
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

    }

    protected AggregateProcessor createAggregator(RouteContext routeContext) throws Exception {
        Processor processor = this.createChildProcessor(routeContext, true);
        // wrap the aggregated route in a unit of work processor
        processor = new UnitOfWorkProcessor(routeContext, processor);

        Expression correlation = getExpression().createExpression(routeContext);
        AggregationStrategy strategy = createAggregationStrategy(routeContext);

        // executor service is mandatory for the Aggregator
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

        // now lets turn all of the event driven consumer processors into a single route
        if (!eventDrivenProcessors.isEmpty()) {
            Processor target = Pipeline.newInstance(getCamelContext(), eventDrivenProcessors);

            // and wrap it in a unit of work so the UoW is on the top, so the entire route will be in the same UoW
            UnitOfWorkProcessor unitOfWorkProcessor = new UnitOfWorkProcessor(this, target);

            // and then optionally add route policy processor if a custom policy is set
            RoutePolicyProcessor routePolicyProcessor = null;
            List<RoutePolicy> routePolicyList = getRoutePolicyList();
            if (routePolicyList != null && !routePolicyList.isEmpty()) {
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

     */
    protected Processor createConsumerProcessor(final Object pojo, final Method method, final Endpoint endpoint) {
        BeanInfo info = new BeanInfo(getCamelContext(), method);
        BeanProcessor answer = new BeanProcessor(pojo, info);
        // must ensure the consumer is being executed in an unit of work so synchronization callbacks etc is invoked
        return new UnitOfWorkProcessor(answer);
    }
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

    }

    protected AggregateProcessor createAggregator(RouteContext routeContext) throws Exception {
        Processor processor = this.createChildProcessor(routeContext, true);
        // wrap the aggregated route in a unit of work processor
        processor = new UnitOfWorkProcessor(routeContext, processor);

        Expression correlation = getExpression().createExpression(routeContext);
        AggregationStrategy strategy = createAggregationStrategy(routeContext);

        // executor service is mandatory for the Aggregator
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

        }

        Processor childProcessor = this.createChildProcessor(routeContext, true);

        // wrap the on completion route in a unit of work processor
        childProcessor = new UnitOfWorkProcessor(routeContext, childProcessor);

        Predicate when = null;
        if (onWhen != null) {
            when = onWhen.getExpression().createPredicate(routeContext);
        }
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

        }

        Processor childProcessor = this.createChildProcessor(routeContext, true);

        // wrap the on completion route in a unit of work processor
        childProcessor = new UnitOfWorkProcessor(routeContext, childProcessor);

        Predicate when = null;
        if (onWhen != null) {
            when = onWhen.getExpression().createPredicate(routeContext);
        }
View Full Code Here

Examples of org.apache.camel.processor.UnitOfWorkProcessor

        Endpoint endpoint = resolveEndpoint(routeContext);
        Producer producer = endpoint.createProducer();
        // create error handler we need to use for processing the wire tapped
        Processor target = wrapInErrorHandler(routeContext, producer);
        // and wrap in UoW, which is needed for error handler as well
        target = new UnitOfWorkProcessor(routeContext, target);

        WireTapProcessor answer = new WireTapProcessor(endpoint, target, getPattern(), threadPool, shutdownThreadPool);
        answer.setCopy(isCopy());
        if (newExchangeProcessorRef != null) {
            newExchangeProcessor = routeContext.mandatoryLookup(newExchangeProcessorRef, Processor.class);
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.