Package org.springframework.beans.factory.xml

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


    }.runTest();
  }

  public void testCtorWithNonExistentMappingLocationArgument() throws Exception {
    // simply must not bail; we don't want non-existent resources to result in an Exception
    new DefaultNamespaceHandlerResolver(null, "738trbc bobabloobop871");
  }
View Full Code Here


  private DefaultListableBeanFactory beanFactory;


  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());
View Full Code Here

      this.bundle = bundle;

      ClassLoader loader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundle);

      entity = new DelegatingEntityResolver(loader);
      namespace = new DefaultNamespaceHandlerResolver(loader);
    }
View Full Code Here

  private NamespaceHandlerResolver createNamespaceHandlerResolver(BundleContext bundleContext,
      ClassLoader bundleClassLoader) {
    Assert.notNull(bundleContext, "bundleContext is required");
    // create local namespace resolver
    // we'll use the default resolver which uses the bundle local class-loader
    NamespaceHandlerResolver localNamespaceResolver = new DefaultNamespaceHandlerResolver(bundleClassLoader);

    // hook in OSGi namespace resolver
    NamespaceHandlerResolver osgiServiceNamespaceResolver = lookupNamespaceHandlerResolver(bundleContext,
      localNamespaceResolver);
View Full Code Here

    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
        // Spring always creates a new one of these, which takes a fair amount
        // of time on startup (nearly 1/2 second) as it gets created for every
        // spring context on the classpath
        if (nsHandlerResolver == null) {
            nsHandlerResolver = new DefaultNamespaceHandlerResolver();
        }
        reader.setNamespaceHandlerResolver(nsHandlerResolver);
       
        reader.setDocumentReaderClass(JaxbBeanDefinitionDocumentReader.class);
        // TODO: check why VALIDATION_XSD complains about mixed content in
View Full Code Here

    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
        // Spring always creates a new one of these, which takes a fair amount
        // of time on startup (nearly 1/2 second) as it gets created for every
        // spring context on the classpath
        if (nsHandlerResolver == null) {
            nsHandlerResolver = new DefaultNamespaceHandlerResolver();
        }
        reader.setNamespaceHandlerResolver(nsHandlerResolver);
       
        String mode = System.getProperty("org.apache.cxf.spring.validation.mode");
        if (mode == null) {
View Full Code Here

  }

  public BeanDefinition parseCustomElement(Element ele, BeanDefinition containingBd) {
    String namespaceUri = getNamespaceURI(ele);
    // new DefaultNamespaceHandlerResolver()
    NamespaceHandler handler = new DefaultNamespaceHandlerResolver().resolve(namespaceUri);
    if (handler == null) {
      error("Unable to locate Spring NamespaceHandler for XML schema namespace [" + namespaceUri + "]",
          ele);
      return null;
    }
View Full Code Here

  }

  public BeanDefinition parseCustomElement(Element ele, BeanDefinition containingBd) {
    String namespaceUri = getNamespaceURI(ele);
    // new DefaultNamespaceHandlerResolver()
    NamespaceHandler handler = new DefaultNamespaceHandlerResolver().resolve(namespaceUri);
    if (handler == null) {
      error("Unable to locate Spring NamespaceHandler for XML schema namespace ["
          + namespaceUri + "]", ele);
      return null;
    }
View Full Code Here

    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
        // Spring always creates a new one of these, which takes a fair amount
        // of time on startup (nearly 1/2 second) as it gets created for every
        // spring context on the classpath
        if (nsHandlerResolver == null) {
            nsHandlerResolver = new DefaultNamespaceHandlerResolver();
        }
        reader.setNamespaceHandlerResolver(nsHandlerResolver);
       
        String mode = SystemUtils.getSpringValidationMode();
        if (null != mode) {
View Full Code Here

    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
        // Spring always creates a new one of these, which takes a fair amount
        // of time on startup (nearly 1/2 second) as it gets created for every
        // spring context on the classpath
        if (nsHandlerResolver == null) {
            nsHandlerResolver = new DefaultNamespaceHandlerResolver();
        }
        reader.setNamespaceHandlerResolver(nsHandlerResolver);
       
        String mode = getSpringValidationMode();
        if (null != mode) {
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver

Copyright © 2018 www.massapicom. 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.