Examples of createContext()


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

        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

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

        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

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

    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

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

        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

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

        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

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

    @Override
    protected CamelContext createCamelContext() throws Exception {
        SpringCamelContextFactory factory = new SpringCamelContextFactory();
        factory.setApplicationContext(getApplicationContext());
        factory.setBundleContext(getBundleContext());
        return factory.createContext();
    }
   
    @Override
    // setup the ActiveMQ component and register it into the camel context
    protected void setupCamelContext(CamelContext camelContext) throws Exception {
View Full Code Here

Examples of org.apache.cayenne.configuration.ObjectContextFactory.createContext()

    public DataChannel get() throws ConfigurationException {
        ObjectContextFactory factory = serverInjector
                .getInstance(ObjectContextFactory.class);

        // TODO: ugly cast
        DataContext serverContext = (DataContext) factory.createContext();
        return new ClientServerChannel(serverContext);
    }
}
View Full Code Here

Examples of org.apache.cocoon.webapps.session.ContextManager.createContext()

        if ( handler != null ) {
            ContextManager contextManager = null;
            try {
                contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
                // create new context
                context = contextManager.createContext(name, loadURI, saveURI);
                handler.addApplicationContext( name );

            } catch (ServiceException ce) {
                throw new ProcessingException("Unable to create session context.", ce);
            } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.flex.forks.batik.ext.awt.image.SVGComposite.createContext()

        Iterator i = srcs.iterator();
        Rectangle myBounds = null;
        while (i.hasNext()) {
            CachableRed cr = (CachableRed)i.next();

            contexts[idx++] = comp.createContext(cr.getColorModel(), cm, null);

            Rectangle newBound = cr.getBounds();
            if (myBounds == null) {
                myBounds = newBound;
                continue;
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RequestContextFactory.createContext()

    }
    else
    {
      final RequestContextFactory factory = RequestContextFactory.getFactory();
      assert factory != null;
      context = factory.createContext(externalContext);
      externalContext.getRequestMap().put(_REQUEST_CONTEXT, context);
    }

    assert RequestContext.getCurrentInstance() == context;
  }
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.