Examples of BusFactory


Examples of org.apache.cxf.BusFactory

    }
    public static Bus createStaticBus() throws Exception {
        if (defaultConfigFileName != null) {
            System.setProperty("cxf.config.file", defaultConfigFileName);
        }
        BusFactory bf = BusFactory.newInstance();
        staticBus = bf.createBus();
        BusFactory.setDefaultBus(staticBus);
        return staticBus;
    }
View Full Code Here

Examples of org.apache.cxf.BusFactory

    protected Message inMessage;
    protected IMocksControl control;
    protected DeliveryChannel channel;
    @Before
    public void setUp() {
        BusFactory bf = BusFactory.newInstance();
        bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
        control = EasyMock.createNiceControl();
    }
View Full Code Here

Examples of org.apache.cxf.BusFactory

    protected void run()  {
        //
        // Just instantiate the Bus; services will be instantiated
        // and published automatically through Spring
        //
        final BusFactory factory = BusFactory.newInstance();
        Bus bus = factory.createBus();
        setBus(bus);
        BusFactory.setDefaultBus(bus);
        BusFactory.setThreadDefaultBus(bus);
    }
View Full Code Here

Examples of org.apache.cxf.BusFactory

    @Test
    public void testBusConstructionWithoutTCCL() throws Exception {
        ClassLoader origClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(new TestClassLoader());
            BusFactory factory = new CXFBusFactory() {
                public Bus createBus(Map<Class, Object> e, Map<String, Object> properties) {
                    return new ExtensionManagerBus(e, properties, this.getClass().getClassLoader());
                }
            };
            Bus bus = factory.createBus();
            assertNotNullExtensions(bus);
        } finally {
            Thread.currentThread().setContextClassLoader(origClassLoader);
        }
    }
View Full Code Here

Examples of org.apache.cxf.BusFactory

     *
     * @throws Exception
     */
    @Test
    public void testDefaultBusConstruction() throws Exception {
        BusFactory factory = new CXFBusFactory();
        Bus bus = factory.createBus();
        assertNotNullExtensions(bus);
    }
View Full Code Here

Examples of org.apache.cxf.BusFactory

    protected NMR nmr;
    protected NMRTransportFactory nmrTransportFactory;
   
    @Before
    public void setUp() {
        BusFactory bf = BusFactory.newInstance();
        bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
        nmrTransportFactory = new NMRTransportFactory();
        nmrTransportFactory.setBus(bus);
        nmrTransportFactory.registerWithBindingManager();
        control = EasyMock.createNiceControl();
View Full Code Here

Examples of org.apache.cxf.BusFactory

           
        };
    }

    protected Bus doGetBus() {
        BusFactory busFactory = BusFactory.newInstance();
        // need to check if the camelContext is SpringCamelContext and
        // update the bus configuration with the applicationContext
        // which SpringCamelContext holds
        if (getCamelContext() instanceof SpringCamelContext) {
            SpringCamelContext springCamelContext = (SpringCamelContext)getCamelContext();
            ApplicationContext applicationContext = springCamelContext.getApplicationContext();
            busFactory = new org.apache.cxf.bus.spring.SpringBusFactory(applicationContext);
        }
        return busFactory.createBus();
       
    }
View Full Code Here

Examples of org.apache.cxf.BusFactory

        }

        public void setApplicationContext(ApplicationContext ctx) throws BeansException {
            if (getBus() == null) {
                // Don't relate on the DefaultBus
                BusFactory factory = new SpringBusFactory(ctx);
                Bus bus = factory.createBus()
                BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
                setBus(bus);
            }
        }
View Full Code Here

Examples of org.apache.cxf.BusFactory

        }
       
        public void setApplicationContext(ApplicationContext ctx) throws BeansException {
            if (getBus() == null) {
                // Don't relate on the DefaultBus
                BusFactory factory = new SpringBusFactory(ctx);
                Bus bus = factory.createBus();   
                BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
                setBus(bus);
            }
        }
View Full Code Here

Examples of org.apache.cxf.BusFactory

       
        public void setApplicationContext(ApplicationContext ctx) throws BeansException {
            applicationContext = ctx;
            if (getBus() == null) {
                // Don't relate on the DefaultBus
                BusFactory factory = new SpringBusFactory(ctx);
                Bus bus = factory.createBus();              
                setBus(bus);
            }
            BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(getBus(), ctx);
        }
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.