Package org.apache.cxf

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


            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);
            bus.shutdown(true);
        } finally {
            Thread.currentThread().setContextClassLoader(origClassLoader);
        }
View Full Code Here


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


View Full Code Here

    private String requestMessageId;

   
    public void sendAndReceive(String replyDestination) throws Exception {
        BusFactory bf = BusFactory.newInstance();
        Bus bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
        EndpointInfo endpointInfo = new EndpointInfo();
        EndpointReferenceType target = new EndpointReferenceType();

        connectionFactory = new PooledConnectionFactory(BROKER_URI);
View Full Code Here

           
            //TODO Check for the managed connection factory properties
            //TODO We may need get the configuration file from properties
           
            BusFactory bf = BusFactory.newInstance();
            bus = bf.createBus();
            initializeServants();
        } catch (Exception ex) {
            if (ex instanceof ResourceAdapterInternalException) {
                throw (ResourceException)ex;
            } else {
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() {
        BusFactory bf = BusFactory.newInstance();
        bus = bf.createBus();
        BusFactory.setDefaultBus(bus);
    }

    @After
    public void tearDown() {
View Full Code Here

        if (getCamelContext() instanceof SpringCamelContext) {
            SpringCamelContext springCamelContext = (SpringCamelContext)getCamelContext();
            ApplicationContext applicationContext = springCamelContext.getApplicationContext();
            busFactory = new org.apache.cxf.bus.spring.SpringBusFactory(applicationContext);
        }
        return busFactory.createBus();
    }
   
    /**
     * Populate a client factory bean
     */
 
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

    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();   
                BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
                setBus(bus);
            } else {
                setBus(BusWiringBeanFactoryPostProcessor.addDefaultBus(ctx));
            }
View Full Code Here

    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

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.