Package org.apache.camel.impl

Examples of org.apache.camel.impl.DefaultCamelContext.addComponent()


        CamelContext camelContext = new DefaultCamelContext(registry);

        SqlComponent sqlComponent = new SqlComponent();
        sqlComponent.setDataSource(dataSource);
        camelContext.addComponent("sql", sqlComponent);

        return camelContext;
    }

    @Test
View Full Code Here


        CamelContext camelContext = new DefaultCamelContext(registry);

        SqlComponent sqlComponent = new SqlComponent();
        sqlComponent.setDataSource(auditDataSource);
        camelContext.addComponent("sql", sqlComponent);

        return camelContext;
    }

    @Test
View Full Code Here

        CamelContext camelContext = new DefaultCamelContext(registry);

        SqlComponent sqlComponent = new SqlComponent();
        sqlComponent.setDataSource(auditDataSource);
        camelContext.addComponent("sql", sqlComponent);

        return camelContext;
    }

    @Test
View Full Code Here

        registry.put("connectionFactory", connectionFactory);

        CamelContext camelContext = new DefaultCamelContext(registry);
        ActiveMQComponent activeMQComponent = new ActiveMQComponent();
        activeMQComponent.setConnectionFactory(connectionFactory);
        camelContext.addComponent("jms", activeMQComponent);
        return camelContext;
    }

    @Test
    public void testTransactedExceptionThrown() throws InterruptedException {
View Full Code Here

        CamelContext camelContext = new DefaultCamelContext(registry);

        SqlComponent sqlComponent = new SqlComponent();
        sqlComponent.setDataSource(dataSource);
        camelContext.addComponent("sql", sqlComponent);

        return camelContext;
    }

    @Test
View Full Code Here

        CamelContext camelContext = new DefaultCamelContext(registry);

        {
            SqlComponent sqlComponent = new SqlComponent();
            sqlComponent.setDataSource(atomikosDataSourceBean);
            camelContext.addComponent("sql", sqlComponent);
        }
        {
            // transactional JMS component
            ActiveMQComponent activeMQComponent = new ActiveMQComponent();
            activeMQComponent.setConnectionFactory(atomikosConnectionFactoryBean);
View Full Code Here

        {
            // transactional JMS component
            ActiveMQComponent activeMQComponent = new ActiveMQComponent();
            activeMQComponent.setConnectionFactory(atomikosConnectionFactoryBean);
            activeMQComponent.setTransactionManager(jtaTransactionManager);
            camelContext.addComponent("jms", activeMQComponent);
        }
        {
            // non-transactional JMS component setup for test purposes
            ActiveMQConnectionFactory connectionFactory =
                new ActiveMQConnectionFactory();
View Full Code Here

            connectionFactory.setBrokerURL(broker.getTcpConnectorUri());

            ActiveMQComponent activeMQComponent = new ActiveMQComponent();
            activeMQComponent.setConnectionFactory(connectionFactory);
            activeMQComponent.setTransactionManager(jtaTransactionManager);
            camelContext.addComponent("nonTxJms", activeMQComponent);
        }
        return camelContext;
    }

    @After
View Full Code Here

    @Override
    public CamelContext createCamelContext() {
        CamelContext context = new DefaultCamelContext();
        // plug in a seda component, as we don't really need an embedded broker
        context.addComponent("activemq", new SedaComponent());
        return context;
    }

    @Override
    public RouteBuilder createRouteBuilder() {
View Full Code Here

        SimpleRegistry registry = new SimpleRegistry();
        // add POJOs to the registry here using registry.put("name", <object reference>)

        CamelContext context = new DefaultCamelContext(registry);

        context.addComponent("mylogger", new LogComponent());
        context.addRoutes(new LogMessageOnTimerEventRouteBuilder());

        context.start();

        // let the Camel runtime do its job for 5 seconds
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.