Examples of loadBeanDefinitions()


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()

            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()

    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());
  }


  public void testSimpleParser() throws Exception {
    TestBean bean = (TestBean) this.beanFactory.getBean("testBean");
View Full Code Here

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

  public void setUp() {
    this.beanFactory = new DefaultListableBeanFactory();
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.beanFactory);
    reader.setEventListener(this.listener);
    reader.loadBeanDefinitions(new ClassPathResource("testUtilNamespace.xml", getClass()));
  }

  public void testConstant() throws Exception {
    Integer min = (Integer) this.beanFactory.getBean("min");
    assertEquals(Integer.MIN_VALUE, min.intValue());
View Full Code Here

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

    assertEquals(1, scopeNames.length);
    assertEquals("myScope", scopeNames[0]);
    assertSame(scope, applicationContext.getBeanFactory().getRegisteredScope("myScope"));

    XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(applicationContext);
    xbdr.loadBeanDefinitions("org/springframework/beans/factory/config/simpleScope.xml");
   
    applicationContext.refresh();
  }
 
  public void testCanGetScopedObject() {
View Full Code Here

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

        GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
        List<URL> urls = ClassLoaderUtils.getResources("META-INF/cxf/java2wsbeans.xml",
                                                       SpringServiceBuilderFactory.class);
        for (URL url : urls) {
            reader.loadBeanDefinitions(new UrlResource(url));
        }
       
        for (String pathname : additionalFilePathnames) {
            try {
                reader.loadBeanDefinitions(new FileSystemResource(pathname));
View Full Code Here

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

            reader.loadBeanDefinitions(new UrlResource(url));
        }
       
        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.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()

            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()

            InputStream applicationContxtInStream, String springBeansFilePath) throws AxisFault {
        GenericApplicationContext appContext = new GenericApplicationContext();

        XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);
        xbdr.setValidating(false);
        xbdr.loadBeanDefinitions(new InputStreamResource(applicationContxtInStream));
        appContext.refresh();
        return appContext;
    }

    public static GenericApplicationContext getSpringApplicationContextClassPath(
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.