Package org.springframework.beans.factory.xml

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


public class JackrabbitNamespaceHandlerTests extends TestCase {

  private XmlBeanFactory beanFactory;

  protected void setUp() throws Exception {
    this.beanFactory = new XmlBeanFactory(new ClassPathResource(
        "/org/springmodules/jcr/jackrabbit/config/jackrabbitNamespaceHandlerTests.xml", getClass()));
  }
View Full Code Here


*/
public class InterceptHandlerParser extends AbstractBeanDefinitionParser {

    @Override
    protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("com/tacitknowledge/flip/spring/context.xml"));
       
        BeanDefinitionBuilder beanBuilder = BeanDefinitionBuilder.rootBeanDefinition(FlipSpringAspect.class);
        String defaultUrlValue = element.getAttribute("default-url");
        MutablePropertyValues propertyValues = new MutablePropertyValues();
        propertyValues.addPropertyValue("defaultValue", defaultUrlValue);
        propertyValues.addPropertyValue(FlipSpringAspect.FEATURE_SERVICE_BEAN_NAME, new RuntimeBeanReference(FlipSpringAspect.FEATURE_SERVICE_BEAN_NAME));
        beanBuilder.getRawBeanDefinition().setPropertyValues(propertyValues);
       
        for(String name : factory.getBeanDefinitionNames()) {
            parserContext.getRegistry().registerBeanDefinition(name, factory.getBeanDefinition(name));
        }
        parserContext.getRegistry().registerBeanDefinition(FlipSpringAspect.ASPECT_BEAN_NAME, beanBuilder.getBeanDefinition());
       
        return null;
    }
View Full Code Here

   
    private XmlBeanFactory context;
   
    @Before
    public void setUp() {
        context = new XmlBeanFactory(new ClassPathResource("test-intercept-handlers-context.xml"));
    }
View Full Code Here

        assertNotNull(featureService);
    }
   
   
    private void setupContext(String contextLocation) {
        context = new XmlBeanFactory(new ClassPathResource(contextLocation));
    }
View Full Code Here

     * @param dbConfigFilename
     * @param dbConnectionName
     * @return instance of database configuration
     */
    public static DatabaseConfig getInstance (String dbConfigFilename, String dbConnectionName) {
        XmlBeanFactory configFactory = new XmlBeanFactory(new FileSystemResource(dbConfigFilename));
        return (DatabaseConfig)configFactory.getBean(dbConnectionName);
    }
View Full Code Here

    }

    public static synchronized XmlBeanFactory getBeanFactory() {
        if (configFactory == null) {
            logger.info(Messages.getFormattedString("ProcessConfig.loadingConfig", getConfigFileLocation()));
            configFactory = new XmlBeanFactory(new FileSystemResource(getConfigFileLocation()));
        }
        return configFactory;
    }
View Full Code Here

public class JcrNamespaceHandlerTests extends TestCase {
  private XmlBeanFactory beanFactory;

  protected void setUp() throws Exception {
    this.beanFactory = new XmlBeanFactory(new ClassPathResource(
        "/org/springmodules/jcr/config/jcrNamespaceHandlerTests.xml", getClass()));
  }
View Full Code Here

            synchronized (semaphore)
            {
                if (null == springFactory)
                {
                    InputStream is = config.getPortletContext().getResourceAsStream(springConfig);                   
                    springFactory = new XmlBeanFactory(is);
                    is.close();
                }
            }
         }
         catch (Exception e)
View Full Code Here

        // Spring setup

        ClassPathResource springBeansResource = new ClassPathResource("SpringBeans.xml",
                TestSpringLookupFactory.class);

        BeanFactory beanFactory = new XmlBeanFactory(springBeansResource);

        Registry r = buildFrameworkRegistry("SpringIntegration.xml");

        SpringBeanFactoryHolder h = (SpringBeanFactoryHolder) r.getService(
                "hivemind.lib.DefaultSpringBeanFactoryHolder",
View Full Code Here

        // Spring setup

        ClassPathResource springBeansResource = new ClassPathResource("SpringBeans.xml",
                TestSpringLookupFactory.class);

        BeanFactory beanFactory = new XmlBeanFactory(springBeansResource);

        Registry r = buildFrameworkRegistry("SpringProvider.xml");

        SpringBeanFactoryHolder h = (SpringBeanFactoryHolder) r.getService(
                "hivemind.lib.DefaultSpringBeanFactoryHolder",
View Full Code Here

TOP

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

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.