Package org.apache.camel.impl

Examples of org.apache.camel.impl.SimpleRegistry


public class GaeDefaultCamelContext extends DefaultCamelContext {

    public GaeDefaultCamelContext() {
        // disable JMX and use the simple registry as JNDI is not allowed
        disableJMX();
        setRegistry(new SimpleRegistry());
    }
View Full Code Here


        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mylogger1", LoggerFactory.getLogger("org.apache.camel.SIFT.l1"));
        registry.put("mylogger2", LoggerFactory.getLogger("org.apache.camel.SIFT.l2"));
        factory.setRegistry(registry);
        CamelContext camelContext = factory.createContext();
        camelContext.setApplicationContextClassLoader(getClass().getClassLoader());
        camelContext.setUseMDCLogging(true);
        return camelContext;
View Full Code Here

        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mylogger", LoggerFactory.getLogger("org.apache.camel.SIFT"));
        factory.setRegistry(registry);
        CamelContext camelContext = factory.createContext();
        camelContext.setApplicationContextClassLoader(getClass().getClassLoader());
        camelContext.setUseMDCLogging(true);
        return camelContext;
View Full Code Here

    }

    @Before
    public void setUp() throws Exception {
        camelContext = new DefaultCamelContext();
        SimpleRegistry registry = new SimpleRegistry();
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("custName", "Willem");
        // bind the params
        registry.put("params", params);
        camelContext.setRegistry(registry);
       
        template = camelContext.createProducerTemplate();
        ServiceHelper.startServices(template, camelContext);
View Full Code Here

        assertTrue(sedaEndpoint.getQueue() instanceof ArrayBlockingQueue);
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        SimpleRegistry simpleRegistry = new SimpleRegistry();
        simpleRegistry.put("arrayQueue", new ArrayBlockingQueue<Exchange>(10));
        return new DefaultCamelContext(simpleRegistry);
    }
View Full Code Here

public class SedaQueueFactoryTest extends ContextTestSupport {
    private final ArrayBlockingQueueFactory<Exchange> arrayQueueFactory = new ArrayBlockingQueueFactory<Exchange>();

    @Override
    protected CamelContext createCamelContext() throws Exception {
        SimpleRegistry simpleRegistry = new SimpleRegistry();
        simpleRegistry.put("arrayQueueFactory", arrayQueueFactory);
        return new DefaultCamelContext(simpleRegistry);
    }
View Full Code Here

        assertThat(sw2.toString(), equalTo(LogComponent.class.getName()));
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        return new DefaultCamelContext(new SimpleRegistry());
    }
View Full Code Here

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

    private SimpleRegistry getRegistry() {
        SimpleRegistry registry = null;
        if (context.getRegistry() instanceof PropertyPlaceholderDelegateRegistry) {
            registry = (SimpleRegistry) ((PropertyPlaceholderDelegateRegistry) context.getRegistry()).getRegistry();
        } else {
            fail("Could not determine Registry type");
        }
View Full Code Here

public class ManagedFromRestGetEmbeddedRouteTest extends ManagementTestSupport {

    @Override
    protected CamelContext createCamelContext() throws Exception {
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("dummy-test", new DummyRestConsumerFactory());
        return new DefaultCamelContext(registry);
    }
View Full Code Here

        assertThat(sw.toString(), equalTo("org.apache.camel.customlogger INFO Also got Bye World"));
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mylogger1", LoggerFactory.getLogger("org.apache.camel.customlogger"));
        CamelContext context = new DefaultCamelContext(registry);
        return context;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.SimpleRegistry

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.