Package org.springframework.beans.factory.xml

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


            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

   
   
       
    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

            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

   
   
       
    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

        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

    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

    }

    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

    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

    }

    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

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.