Package org.apache.camel.util.jndi

Examples of org.apache.camel.util.jndi.JndiContext.bind()


        JndiContext answer = new JndiContext();
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=true");
        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }
View Full Code Here


        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=true");
        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }

View Full Code Here

        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }


}
View Full Code Here

    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);

        // add ActiveMQ client
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61617");
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
View Full Code Here

        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);

        // add ActiveMQ client
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61617");
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

        return answer;
    }

    public int getExpectedMessageCount() {
View Full Code Here

        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }

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

    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);

        // add ActiveMQ client
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61618");
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
View Full Code Here

        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);

        // add ActiveMQ client
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61618");
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

        return answer;
    }

    @Override
View Full Code Here

        // Boot up a local RMI registry
        LocateRegistry.createRegistry(getPort());

        // START SNIPPET: register
        JndiContext context = new JndiContext();
        context.bind("bye", new SayService("Good Bye!"));

        CamelContext camelContext = new DefaultCamelContext(context);
        // END SNIPPET: register

        camelContext.addRoutes(getRouteBuilder(camelContext));
View Full Code Here

        JndiContext answer = new JndiContext();
        IoFilter myFilter = new TestFilter();
        List<IoFilter> myFilters = new ArrayList<IoFilter>();
        myFilters.add(myFilter);

        answer.bind("myFilters", myFilters);
        answer.bind("myFilter", myFilter);
        return answer;
    }
}
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.