Package org.apache.camel.impl

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


    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = new DefaultCamelContext();
        AMQConnectionResource pool = new AMQConnectionResource("tcp://localhost:33333", 1);
        SjmsComponent component = new SjmsComponent();
        component.setConnectionResource(pool);
        camelContext.addComponent("sjms", component);
        return camelContext;
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
View Full Code Here


    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = new DefaultCamelContext();

        ConnectionFactory connectionFactory = CamelJmsTestHelper.createPersistentConnectionFactory();
        context.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));

        return context;
    }

    protected MBeanServer getMBeanServer() {
View Full Code Here

    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = new DefaultCamelContext();

        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
        context.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));

        return context;
    }

    protected MBeanServer getMBeanServer() {
View Full Code Here

        // connectionFactory.setReconnAttemptCount(1);

        jmsComponent.setConnectionFactory(connectionFactory);
        jmsComponent.setRequestTimeout(1000);
        jmsComponent.setReceiveTimeout(1000);
        context.addComponent("jms", jmsComponent);
        context.addRoutes(new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                from("jms:testqueue").bean(new EchoServiceImpl());
View Full Code Here

        PropertiesComponent pc = new PropertiesComponent();
        pc.setLocation("file:./target/jsse-test.properties");

        CamelContext context = new DefaultCamelContext();
        context.addComponent("properties", pc);

        return context;
    }

}
View Full Code Here

        idempotentRepository = new JdbcMessageIdRepository(auditDataSource, transactionTemplate, "ws");

        CamelContext camelContext = new DefaultCamelContext(registry);
        SqlComponent sqlComponent = new SqlComponent();
        sqlComponent.setDataSource(auditDataSource);
        camelContext.addComponent("sql", sqlComponent);
        return camelContext;
    }

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

        CamelContext camelContext = new DefaultCamelContext(registry);

        ActiveMQComponent activeMQComponent = new ActiveMQComponent();
        activeMQComponent.setConnectionFactory(connectionFactory);
        activeMQComponent.setTransactionManager(jmsTransactionManager);
        camelContext.addComponent("jms", activeMQComponent);

        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(dataSource);
        camelContext.addComponent("sql", sqlComponent);

        return camelContext;
    }

    @Test
View Full Code Here

        CamelContext camelContext = new DefaultCamelContext(registry);

        ActiveMQComponent activeMQComponent = new ActiveMQComponent();
        activeMQComponent.setConnectionFactory(connectionFactory);
        activeMQComponent.setTransactionManager(jmsTransactionManager);
        camelContext.addComponent("jms", activeMQComponent);

        return camelContext;
    }

    @Test
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.