Package org.apache.camel.util.jndi

Examples of org.apache.camel.util.jndi.JndiContext


        producer.stop();
    }

    @Override
    protected Context createJndiContext() throws Exception {
        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


    private DummyLifecycleStrategy dummy1 = new DummyLifecycleStrategy();
    private DummyLifecycleStrategy dummy2 = new DummyLifecycleStrategy();

    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = new DefaultCamelContext(new JndiContext());
        context.addLifecycleStrategy(dummy1);
        context.addLifecycleStrategy(dummy2);
        return context;
    }
View Full Code Here

        assertMockEndpointsSatisfied();
    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myBean", new MyBean());
        answer.bind("myStrategy", new MyAggregationStrategy());
        return answer;
    }
View Full Code Here

    protected CamelContext createCamelContext() throws Exception {
        return new DefaultCamelContext(createJndiContext());
    }

    protected Context createJndiContext() throws Exception {
        return new JndiContext(new Hashtable());
    }
View Full Code Here

        assertEquals(123, end.getExchanges().get(0).getIn().getHeader("out"));
    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);
        return answer;
    }
View Full Code Here

            assertSame(myBean, mnfe.getBean());
        }
    }

    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        bean = new MyBean();
        answer.bind("myBean", bean);
        return answer;
    }
View Full Code Here

* @version
*/
public class BeanLookupUsingJndiRegistryIssueTest extends TestCase {

    public void testCamelWithJndi() throws Exception {
        JndiContext jndi = new JndiContext();
        jndi.bind("foo", new MyOtherDummyBean());

        CamelContext camel = new DefaultCamelContext(jndi);
        camel.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
View Full Code Here

    @SuppressWarnings("unchecked")
    public void testPojoRoutes() throws Exception {
        // START SNIPPET: register
        // lets populate the context with the services we need
        // note that we could just use a spring.xml file to avoid this step
        JndiContext context = new JndiContext();
        context.bind("bye", new SayService("Good Bye!"));

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

        // START SNIPPET: route
View Full Code Here

* @version
*/
public class SimulatorTest extends ContextTestSupport {

    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("foo", new MyBean("foo"));
        answer.bind("bar", new MyBean("bar"));
        return answer;
    }
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

TOP

Related Classes of org.apache.camel.util.jndi.JndiContext

Copyright © 2018 www.massapicom. 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.