Package org.apache.cxf.transport.jbi

Examples of org.apache.cxf.transport.jbi.JBITransportFactory


        cf.setServiceName(getService());
        cf.setServiceClass(type);
        cf.setAddress("jbi://" + new IdGenerator().generateSanitizedId());
        cf.setBindingId(org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
        Bus bus = BusFactory.getDefaultBus();
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) bus
                .getExtension(ConduitInitiatorManager.class)
                .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
        if (getContext() != null) {
            DeliveryChannel dc = getContext().getDeliveryChannel();
            if (dc != null) {
                jbiTransportFactory.setDeliveryChannel(dc);
            }
        }
        return cf.create();
    }
View Full Code Here


     *
     * @see org.apache.servicemix.common.endpoints.ProviderEndpoint#process(javax.jbi.messaging.MessageExchange)
     */
    @Override
    public void process(MessageExchange exchange) throws Exception {
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) getBus()
                .getExtension(ConduitInitiatorManager.class)
                .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
        JBIDestination jbiDestination = jbiTransportFactory
                .getDestination(exchange.getService().toString()
                        + exchange.getInterfaceName().toString());
        DeliveryChannel dc = getContext().getDeliveryChannel();
        jbiTransportFactory.setDeliveryChannel(dc);
        jbiDestination.setDeliveryChannel(dc);
        if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
            jbiDestination.getJBIDispatcherUtil().dispatch(exchange);
        }
       
View Full Code Here

                                                    "endpoint");
       
        container.activateComponent(new ActivationSpec("component", component));
       
        DeliveryChannel channel = component.getChannel();
        JBITransportFactory jbiTransportFactory =
            (JBITransportFactory)bus.getExtension(ConduitInitiatorManager.class).
                getConduitInitiator(CXFServiceEngine.JBI_TRANSPORT_ID);
        jbiTransportFactory.setBus(bus);
       
        jbiTransportFactory.setDeliveryChannel(channel);
        HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
       
        Greeter port = ss.getSoapPort();
        Object implementor = new GreeterImpl();
        String address = "http://foo/bar/baz";
View Full Code Here

                            new Exception("Operation not bound on this MessageExchange"));
               
            }
        }
       
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) getBus()
                .getExtension(ConduitInitiatorManager.class)
                .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
       
        QName serviceName = exchange.getService();
        if (serviceName == null) {
            serviceName = getService();
            exchange.setService(serviceName);
        }
        QName interfaceName = exchange.getInterfaceName();
        if (interfaceName == null) {
            interfaceName = getInterfaceName();
            exchange.setInterfaceName(interfaceName);
        }
        JBIDestination jbiDestination = jbiTransportFactory
                .getDestination(serviceName.toString()
                        + interfaceName.toString());
        DeliveryChannel dc = getContext().getDeliveryChannel();
        jbiTransportFactory.setDeliveryChannel(dc);
       
        jbiDestination.setDeliveryChannel(dc);
        if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
            jbiDestination.getJBIDispatcherUtil().dispatch(exchange);
        }
View Full Code Here

    @Override
    public void stop() throws Exception {
        endpoint.stop();
        ReflectionUtils.callLifecycleMethod(getPojo(), PreDestroy.class);
        JBIDispatcherUtil.clean();
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) getBus()
            .getExtension(ConduitInitiatorManager.class)
            .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
        jbiTransportFactory.setDeliveryChannel(null);
        jbiTransportFactory.removeDestination(getService().toString()
                    + getInterfaceName().toString());
        super.stop();
    }
View Full Code Here

        //test redepoly su
        component.getServiceUnitManager().stop("target");
        component.getServiceUnitManager().shutDown("target");
        component.getServiceUnitManager().undeploy("target", getServiceUnitPath("proxytarget"));
       
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) component.getBus()
            .getExtension(ConduitInitiatorManager.class)
            .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
        assertNull(jbiTransportFactory.getDeliveryChannel());
        component.getServiceUnitManager().init("target", getServiceUnitPath("proxytarget"));
        component.getServiceUnitManager().start("target");
       
        client = new DefaultServiceMixClient(container);
        io = client.createInOutExchange();
View Full Code Here

        cf.setAddress("jbi://" + new IdGenerator().generateSanitizedId());
        if (isUseJBIWrapper()) {
            cf.setBindingId(org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
        }
        Bus bus = BusFactory.getDefaultBus();
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) bus
                .getExtension(ConduitInitiatorManager.class)
                .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
        if (getInternalContext() != null) {
            DeliveryChannel dc = getInternalContext().getDeliveryChannel();
            if (dc != null) {
                jbiTransportFactory.setDeliveryChannel(dc);
            }
        }
        return cf.create();
    }
View Full Code Here

                            new Exception("Operation not bound on this MessageExchange"));
               
            }
        }
       
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) getBus()
                .getExtension(ConduitInitiatorManager.class)
                .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
       
        QName serviceName = exchange.getService();
        if (serviceName == null) {
            serviceName = getService();
            exchange.setService(serviceName);
        }
        QName interfaceName = exchange.getInterfaceName();
        if (interfaceName == null) {
            interfaceName = getInterfaceName();
            exchange.setInterfaceName(interfaceName);
        }
        JBIDestination jbiDestination = jbiTransportFactory
                .getDestination(serviceName.toString()
                        + interfaceName.toString());
        DeliveryChannel dc = getContext().getDeliveryChannel();
        jbiTransportFactory.setDeliveryChannel(dc);
       
        jbiDestination.setDeliveryChannel(dc);
        if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
            jbiDestination.getJBIDispatcherUtil().dispatch(exchange);
        }
View Full Code Here

    @Override
    public void stop() throws Exception {
        endpoint.stop();
        ReflectionUtils.callLifecycleMethod(getPojo(), PreDestroy.class);
        JBIDispatcherUtil.clean();
        JBITransportFactory jbiTransportFactory = (JBITransportFactory) getBus()
            .getExtension(ConduitInitiatorManager.class)
            .getConduitInitiator(CxfSeComponent.JBI_TRANSPORT_ID);
        jbiTransportFactory.removeDestination(getService().toString()
                    + getInterfaceName().toString());
        super.stop();
    }
View Full Code Here

                                                    "endpoint");
       
        container.activateComponent(new ActivationSpec("component", component));
       
        DeliveryChannel channel = component.getChannel();
        JBITransportFactory jbiTransportFactory =
            (JBITransportFactory)bus.getExtension(ConduitInitiatorManager.class).
                getConduitInitiator(CXFServiceEngine.JBI_TRANSPORT_ID);
        jbiTransportFactory.setBus(bus);
       
        jbiTransportFactory.setDeliveryChannel(channel);
        HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
       
        Greeter port = ss.getSoapPort();
        Object implementor = new GreeterImpl();
        String address = "http://foo/bar/baz";
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.jbi.JBITransportFactory

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.