Package org.apache.cxf

Examples of org.apache.cxf.BusFactory.createBus()


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


        if (context instanceof SpringCamelContext) {
            SpringCamelContext springCamelContext = (SpringCamelContext) context;
            ApplicationContext applicationContext = springCamelContext.getApplicationContext();
            busFactory = new SpringBusFactory(applicationContext);
        }
        return busFactory.createBus();
    }
}


View Full Code Here

    @Before
    public void setUp() throws Exception {
        super.setUp();
        BusFactory bf = BusFactory.newInstance();
        //setup the camel transport for the bus
        bus = bf.createBus();
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        CamelTransportFactory camelTransportFactory = new CamelTransportFactory();
        //set the context here to the transport factory;
        camelTransportFactory.setCamelContext(context);
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
View Full Code Here

        if (bus == null) {
            if (Version.getCurrentVersion().startsWith("2.3")) {
                // Don't relate on the DefaultBus
                BusFactory factory = new SpringBusFactory(ctx);
                bus = factory.createBus();              
                BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
            } else {
                bus = BusWiringBeanFactoryPostProcessor.addDefaultBus(ctx);
            }
        }
View Full Code Here

        cri = new CXFConnectionRequestInfo(Greeter.class, wsdl, serviceName, portName);

        cri2 = new CXFConnectionRequestInfo(Greeter.class, wsdl, serviceName2, portName2);
       
        BusFactory bf = BusFactory.newInstance();
        bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
       
       
        EasyMock.reset(factory);
       
View Full Code Here

    public void testMatchManagedConnectionsWithBoundConnections() throws Exception {

   
        Subject subj = new Subject();
        BusFactory bf = BusFactory.newInstance();       
        Bus bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
        ManagedConnectionFactoryImpl factory = EasyMock.createMock(ManagedConnectionFactoryImpl.class);
        factory.getBus();
        // In ManagedConnectionImpl:
        // one for getCXFServiceFromBus , another for createInvocationHandler
View Full Code Here

    }
   
    @Before
    public void setUp() {
        BusFactory bf = BusFactory.newInstance();
        bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
    }
   
    @After
    public void tearDown() {
View Full Code Here

    protected Message inMessage;

    public void setUp() throws Exception {
        camelContext.start();
        BusFactory bf = BusFactory.newInstance();
        bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
    }

    public void tearDown() throws Exception {
        bus.shutdown(true);
View Full Code Here

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

    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;
    }
   
    @After
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.