Examples of loadBeanDefinitions()


Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

            LOG.log(Level.INFO, "BUILD_ENDPOINTS_FROM_CONFIG_LOCATION", new Object[]{location});
            childCtx = new GenericApplicationContext(ctx);
           
            XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(childCtx);
            reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
            reader.loadBeanDefinitions(new InputStreamResource(is, location));
           
            childCtx.refresh();
        }
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

   
   
       
    private void readBeans(Resource beanResource) {
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(applicationContext);
        reader.loadBeanDefinitions(beanResource);
    }
   
    @Before
    public void setSystemProperties() {
        close = System.getProperty("org.apache.cxf.transports.http_jetty.DontClosePort");       
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

        applicationContext = new GenericApplicationContext();
        resourceLoader = new DefaultResourceLoader(configContextClass.getClassLoader());
        for (String beanDefinitionPath : getConfigLocations()) {
            XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(applicationContext);
            Resource resource = resourceLoader.getResource(beanDefinitionPath);
            reader.loadBeanDefinitions(resource);
        }
        additionalSpringConfiguration(applicationContext);
        applicationContext.refresh();
        super.setUpBus();
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

    private synchronized void buildAppContext(MessageContext synCtx) {
        log.debug("Creating Spring ApplicationContext from property key : " + configKey);
        GenericApplicationContext appContext = new GenericApplicationContext();
        XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);
        xbdr.setValidating(false);
        xbdr.loadBeanDefinitions(new InputStreamResource(
            Util.getStreamSource(
                    synCtx.getConfiguration().getProperty(configKey)).getInputStream()));
        appContext.refresh();
        this.appContext = appContext;
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

    }

    public void testGenericApplicationContextUsingNamespaces() throws Exception {
        GenericApplicationContext applicationContext = new GenericApplicationContext();
        XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(applicationContext);
        xmlReader.loadBeanDefinitions(new ClassPathResource("org/apache/camel/spring/camelContextFactoryBean.xml"));

        // lets refresh to inject the applicationContext into beans
        applicationContext.refresh();

        CamelContext context = (CamelContext) applicationContext.getBean("camel3");
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

    private synchronized void buildAppContext(MessageContext synCtx) {
        log.debug("Creating Spring ApplicationContext from property key : " + configKey);
        GenericApplicationContext appContext = new GenericApplicationContext();
        XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);
        xbdr.setValidating(false);
        xbdr.loadBeanDefinitions(new InputStreamResource(
            Util.getStreamSource(
                    synCtx.getConfiguration().getProperty(configKey)).getInputStream()));
        appContext.refresh();
        this.appContext = appContext;
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

    }

    public void testGenericApplicationContextUsingNamespaces() throws Exception {
        GenericApplicationContext applicationContext = new GenericApplicationContext();
        XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(applicationContext);
        xmlReader.loadBeanDefinitions(new ClassPathResource("org/apache/camel/spring/camelContextFactoryBean.xml"));

        // lets refresh to inject the applicationContext into beans
        applicationContext.refresh();

        CamelContext context = applicationContext.getBean("camel3", CamelContext.class);
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

            beanFactory.registerBeanDefinition(MUNIT_FACTORY_POST_PROCESSOR, beanDefinition);
        }
        // Communicate mule context to parsers

        getCurrentMuleContext().set(this.getMuleContext());
        beanDefinitionReader.loadBeanDefinitions(getConfigResources());

        getCurrentMuleContext().remove();
    }

    protected MunitXmlBeanDefinitionReader getMunitXmlBeanDefinitionReader(DefaultListableBeanFactory beanFactory) {
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

  public static ProcessEngineConfiguration parseProcessEngineConfiguration(Resource springResource, String beanName) {
    DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
    XmlBeanDefinitionReader xmlBeanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
    xmlBeanDefinitionReader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
    xmlBeanDefinitionReader.loadBeanDefinitions(springResource);
    ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) beanFactory.getBean(beanName);
    processEngineConfiguration.setBeans(new SpringBeanFactoryProxyMap(beanFactory));
    return processEngineConfiguration;
  }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

                Thread.currentThread().setContextClassLoader(serviceCL);
                XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);

                // load the bean context file from the parameter
                if (contextLocationParam != null) {
                    xbdr.loadBeanDefinitions(new ClassPathResource((String) contextLocationParam
                            .getValue()));
                    appContext.refresh();
                    AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup();
                    Parameter springGroupCtxLocation = axisServiceGroup
                            .getParameter(SPRING_APPLICATION_CONTEXT_LOCATION);
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.