Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.BeanReference


        httpBldr.parseInterceptUrlsForEmptyFilterChains();
        httpBldr.createSecurityContextPersistenceFilter();
        httpBldr.createSessionManagementFilters();

        ManagedList<BeanReference> authenticationProviders = new ManagedList<BeanReference>();
        BeanReference authenticationManager = createAuthenticationManager(element, pc, authenticationProviders, null);

        httpBldr.createServletApiFilter();
        httpBldr.createChannelProcessingFilter();
        httpBldr.createFilterSecurityInterceptor(authenticationManager);
View Full Code Here


    BeanDefinitionRegistry factory = new DefaultListableBeanFactory();
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);
    reader.loadBeanDefinitions(new ClassPathResource("namespace/converter-custom-fieldnamingstrategy.xml"));

    BeanDefinition definition = reader.getRegistry().getBeanDefinition(beanId.concat(".mongoMappingContext"));
    BeanReference value = (BeanReference) definition.getPropertyValues().getPropertyValue("fieldNamingStrategy")
        .getValue();

    assertThat(value.getBeanName(), is("customFieldNamingStrategy"));
  }
View Full Code Here

        BeanDefinition selectorDef = (BeanDefinition) beanDefinition.getConstructorArgumentValues()
                                                                    .getArgumentValue(0, BeanDefinition.class)
                                                                    .getValue();
        assertEquals("constructor value is wrong", AutowiringClusterSelector.class.getName(),
                     selectorDef.getBeanClassName());
        BeanReference terminalRef = (BeanReference) beanDefinition.getConstructorArgumentValues()
                                                                  .getArgumentValue(1, BeanReference.class)
                                                                  .getValue();
        assertEquals("constructor value is wrong", "terminal", terminalRef.getBeanName());
        assertNotNull(beanFactory.getBean("eventBusTerminal", EventBus.class));
    }
View Full Code Here

        BeanDefinition beanDefinition = beanFactory.getBeanDefinition("eventBusTerminalClusterSelector");
        assertNotNull("Bean definition not created", beanDefinition);
        assertEquals("Wrong bean class", ClusteringEventBus.class.getName(), beanDefinition.getBeanClassName());
        assertEquals("wrong amount of constructor arguments"
                , 2, beanDefinition.getConstructorArgumentValues().getArgumentCount());
        BeanReference selectorRef = (BeanReference) beanDefinition.getConstructorArgumentValues()
                                                                    .getArgumentValue(0, BeanReference.class)
                                                                    .getValue();
        assertEquals("constructor value is wrong", "clusterSelector", selectorRef.getBeanName());
        BeanReference terminalRef = (BeanReference) beanDefinition.getConstructorArgumentValues()
                                                                  .getArgumentValue(1, BeanReference.class)
                                                                  .getValue();
        assertEquals("constructor value is wrong", "terminal", terminalRef.getBeanName());

        assertNotNull(beanFactory.getBean("eventBusTerminalClusterSelector", EventBus.class));
    }
View Full Code Here

        BeanDefinition beanDefinition = beanFactory.getBeanDefinition("eventBusClusterSelector");
        assertNotNull("Bean definition not created", beanDefinition);
        assertEquals("Wrong bean class", ClusteringEventBus.class.getName(), beanDefinition.getBeanClassName());
        assertEquals("wrong amount of constructor arguments"
                , 1, beanDefinition.getConstructorArgumentValues().getArgumentCount());
        BeanReference selectorRef = (BeanReference) beanDefinition.getConstructorArgumentValues()
                                                                  .getArgumentValue(0, BeanReference.class)
                                                                  .getValue();
        assertEquals("constructor value is wrong", "clusterSelector", selectorRef.getBeanName());

        assertNotNull(beanFactory.getBean("eventBusClusterSelector", EventBus.class));
    }
View Full Code Here

        ValueHolder reference = definition.getConstructorArgumentValues().getArgumentValue(2, EventEntryStore.class);
        assertNotNull("Event entry store reference is wrong", reference);
        BeanDefinition eventEntryStore = (BeanDefinition) reference.getValue();
        assertEquals(1, eventEntryStore.getConstructorArgumentValues().getArgumentCount());
        final BeanReference beanReference = (BeanReference) eventEntryStore.getConstructorArgumentValues()
                                                                                  .getIndexedArgumentValue(0,
                                                                                          EventEntryFactory.class)
                .getValue();
        assertEquals("Event entry store reference is wrong", "customEventEntryFactory", beanReference.getBeanName());

        assertNotNull(beanFactory.getBean("eventStoreWithCustomEventEntryStore"));
    }
View Full Code Here

                    Collection<Object> checked = new ArrayList<Object>(ids.size());
                    for (Object id : ids) {
                        if (id instanceof QName) {
                            checked.add(id);
                        } else if (id instanceof BeanReference) {
                            BeanReference br = (BeanReference)id;
                            Object refId = context.getBean(br.getBeanName());
                            checked.add(refId);
                        } else if (id instanceof BeanDefinitionHolder) {
                            BeanDefinitionHolder bdh = (BeanDefinitionHolder)id;
                            if (QName.class.getName().equals(bdh.getBeanDefinition().getBeanClassName())) {
                                try {
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.config.BeanReference

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.