Package org.apache.cxf.bus.spring

Examples of org.apache.cxf.bus.spring.BusApplicationContext


    }
   
    @Test
    public void testConfigureSimple() {
        SimpleBean sb = new SimpleBean("simple");
        BusApplicationContext ac =
            new BusApplicationContext("/org/apache/cxf/configuration/spring/test-beans.xml",
                                      false);

        ConfigurerImpl configurer = new ConfigurerImpl();
        configurer.setApplicationContext(ac);
       
View Full Code Here


    }
   
    @Test
    public void testConfigureSimpleMatchingStarBeanId() {
        SimpleBean sb = new SimpleBean("simple2");
        BusApplicationContext ac =
            new BusApplicationContext("/org/apache/cxf/configuration/spring/test-beans.xml",
                                      false);

        ConfigurerImpl configurer = new ConfigurerImpl();
        configurer.setApplicationContext(ac);
        configurer.configureBean(sb);
View Full Code Here

        new DefaultBusFactory().createBus(config);
        // Init the context which contains the client bean,
        // and we use the already loaded bus to set the configuration
        // The false parameter means we just use the default bus
        // which just set by the DefaultBusFactory
        BusApplicationContext context = new BusApplicationContext(beans, false);
        Greeter bethal = (Greeter)context.getBean("Bethal");       
        // verify the client side's setting
        verifyBethalClient(bethal);        
    }
View Full Code Here

            cfgFile = DEFAULT_USER_CFG_FILE;
        }
        ClassPathResource cpr = new ClassPathResource(cfgFile);
        if (cpr.exists()) {
            try {
                BusApplicationContext ac = new BusApplicationContext(cfgFile, false);
                ac.refresh();
                setApplicationContext(ac);
            } catch (BeansException ex) {
                LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
            }
        } else {
View Full Code Here

     *
     * @param bus
     * @return
     */
    public static ApplicationContext getApplicationContext(List<String> additionalFilePathnames) {
        BusApplicationContext busApplicationContext = BusFactory.getDefaultBus()
            .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) {
View Full Code Here

     * This is factored out to permit use in a unit test.
     * @param bus
     * @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 {
View Full Code Here

     *
     * @param bus
     * @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 {
View Full Code Here

     *
     * @param bus
     * @return
     */
    public static ApplicationContext getApplicationContext(List<String> additionalFilePathnames) {
        BusApplicationContext busApplicationContext = BusFactory.getDefaultBus()
            .getExtension(BusApplicationContext.class);
        GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
        List<URL> urls = ClassLoaderUtils.getResources("META-INF/cxf/java2wsbeans.xml",
                                                       SpringServiceBuilderFactory.class);
View Full Code Here

   
    @Test
    public void testConfigureSimpleNoMatchingBean() {
        SimpleBean sb = new SimpleBean("unknown");
       
        BusApplicationContext ac =
            new BusApplicationContext("/org/apache/cxf/configuration/spring/test-beans.xml",
                                      false);

        ConfigurerImpl configurer = new ConfigurerImpl(ac);
        configurer.configureBean(sb);
        assertEquals("Unexpected value for attribute stringAttr",
View Full Code Here

   
   
    public void verifyConfigureSimple(String beanName) {
       
        SimpleBean sb = new SimpleBean(beanName);
        BusApplicationContext ac =
            new BusApplicationContext("/org/apache/cxf/configuration/spring/test-beans.xml",
                                      false);

        ConfigurerImpl configurer = new ConfigurerImpl();
        configurer.setApplicationContext(ac);
       
View Full Code Here

TOP

Related Classes of org.apache.cxf.bus.spring.BusApplicationContext

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.