Package org.apache.camel.osgi

Examples of org.apache.camel.osgi.CamelContextFactory.createContext()


        LOG.info("Creating the CamelContext ...");
        setThreadContextClassLoader();
        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        LOG.info("Get the bundleContext is " + bundleContext);
        return factory.createContext();
    }

    protected void setThreadContextClassLoader() {
        // set the thread context classloader current bundle classloader
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
View Full Code Here


        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        factory.setRegistry(createRegistry());
        return factory.createContext();
    }
   
    protected void setThreadContextClassLoader() {
        // set the thread context classloader current bundle classloader
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
View Full Code Here

        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        factory.setRegistry(createRegistry());
        return factory.createContext();
    }
   
    protected void setThreadContextClassLoader() {
        // set the thread context classloader current bundle classloader
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
View Full Code Here

    protected CamelContext createCamelContext() throws Exception {
        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        LOG.info("Get the bundleContext is " + bundleContext);
        return factory.createContext();
    }

    public static String extractName(Class<?> clazz) {
        String name = clazz.getName();
        int id0 = name.indexOf("Camel") + "Camel".length();
View Full Code Here

        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

        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

    protected CamelContext createCamelContext() throws Exception {
        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        log.info("Get the bundleContext is " + bundleContext);
        return factory.createContext();
    }

    public static String extractName(Class clazz) {
        String name = clazz.getName();
        int id0 = name.indexOf("Camel") + "Camel".length();
View Full Code Here

   
    protected CamelContext createCamelContext() throws Exception {
        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        LOG.info("Get the bundleContext is " + bundleContext);
        return factory.createContext();
    }
   
   
    public static UrlReference getCamelKarafFeatureUrl() {
        String springVersion = System.getProperty("springVersion");
View Full Code Here

        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        factory.setRegistry(createRegistry());
        return factory.createContext();
    }
   
    protected void setThreadContextClassLoader() {
        // set the thread context classloader current bundle classloader
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
View Full Code Here

        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        factory.setRegistry(createRegistry());
        return factory.createContext();
    }
   
    protected void setThreadContextClassLoader() {
        // set the thread context classloader current bundle classloader
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
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.