Examples of XmlBeanDefinitionReader


Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

     * @return
     */
    public static ApplicationContext getApplicationContext(Bus bus, List<String> additionalFilePathnames) {
        BusApplicationContext busApplicationContext = bus.getExtension(BusApplicationContext.class);
        GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
        reader.loadBeanDefinitions(new ClassPathResource("META-INF/cxf/java2wsbeans.xml"));
        for (String pathname : additionalFilePathnames) {
            try {
                reader.loadBeanDefinitions(new FileSystemResource(pathname));
            } catch (BeanDefinitionStoreException bdse) {
                throw new ToolException("Unable to open bean definition file " + pathname, bdse.getCause());
            }
        }

View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

     * @return
     */
    public static ApplicationContext getApplicationContext(Bus bus, List<String> additionalFilePathnames) {
        BusApplicationContext busApplicationContext = bus.getExtension(BusApplicationContext.class);
        GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
        reader.loadBeanDefinitions(new ClassPathResource("META-INF/cxf/java2wsbeans.xml"));
        for (String pathname : additionalFilePathnames) {
            try {
                reader.loadBeanDefinitions(new FileSystemResource(pathname));
            } catch (BeanDefinitionStoreException bdse) {
                throw new ToolException("Unable to open bean definition file " + pathname, bdse.getCause());
            }
        }
           
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

     * @param configFile the configuration file to be used
     */
    public SpringConfigExtension(String name, String configFile) {
        setName(name);
        appContext = new GenericApplicationContext();
        XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);
        xbdr.setValidating(false);
        xbdr.loadBeanDefinitions(new FileSystemResource(configFile));
        appContext.refresh();
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

    private GenericApplicationContext applicationContext;
   
   
       
    private void readBeans(Resource beanResource) {
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(applicationContext);
        reader.loadBeanDefinitions(beanResource);
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

            return;
        }
        applicationContext = new GenericApplicationContext();
        resourceLoader = new DefaultResourceLoader(getClass().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


  protected void setUp() throws Exception {
    this.problemReporter = new CollatingProblemReporter();
    this.beanFactory = new DefaultListableBeanFactory();
    this.reader = new XmlBeanDefinitionReader(this.beanFactory);
    this.reader.setProblemReporter(this.problemReporter);
  }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

    private GenericApplicationContext applicationContext;
   
   
       
    private void readBeans(Resource beanResource) {
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(applicationContext);
        reader.loadBeanDefinitions(beanResource);
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

       
        if (is != null) {
            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

    Resource flowResource = flowModelHolder.getFlowModelResource();
    flowContext.setResourceLoader(new FlowRelativeResourceLoader(flowResource));
    if (JdkVersion.isAtLeastJava15()) {
      AnnotationConfigUtils.registerAnnotationConfigProcessors(flowContext);
    }
    new XmlBeanDefinitionReader(flowContext).loadBeanDefinitions(resources);
    registerFlowBeans(flowContext.getBeanFactory());
    registerMessageSource(flowContext, flowResource);
    flowContext.refresh();
    return flowContext;
  }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader

  protected void setUp() throws Exception {
    String location = "org/springframework/beans/factory/xml/support/customNamespace.properties";
    NamespaceHandlerResolver resolver = new DefaultNamespaceHandlerResolver(getClass().getClassLoader(), location);
    this.beanFactory = new DefaultListableBeanFactory();
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.beanFactory);
    reader.setNamespaceHandlerResolver(resolver);
    reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
    reader.setEntityResolver(new DummySchemaResolver());
    reader.loadBeanDefinitions(getResource());
  }
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.