Package org.apache.servicemix.jbi.container

Examples of org.apache.servicemix.jbi.container.ActivationSpec


        // Add a jms receiver
        JmsServiceComponent jmsReceiver = new JmsServiceComponent();
        jmsTemplate.setDefaultDestinationName("queue/A");
        jmsReceiver.setTemplate(jmsTemplate);
        jmsReceiver.afterPropertiesSet();
        ActivationSpec asJmsReceiver = new ActivationSpec("jmsReceiver", jmsReceiver);
        asJmsReceiver.setDestinationService(new QName("test", "receiver"));
        container.activateComponent(asJmsReceiver);

        // Add an echo component
        EchoComponent echo = new EchoComponent();
        ActivationSpec asEcho = new ActivationSpec("receiver", echo);
        asEcho.setService(new QName("test", "receiver"));
        container.activateComponent(asEcho);

        // Deploy SU
        URL url = getClass().getClassLoader().getResource("provider/jms.wsdl");
        File path = new File(new URI(url.toString()));
View Full Code Here


        JmsComponent component = new JmsComponent();
        container.activateComponent(component, "JMSComponent");

        // Add an echo component
        EchoComponent echo = new EchoComponent();
        ActivationSpec asEcho = new ActivationSpec("receiver", echo);
        asEcho.setService(new QName("http://jms.servicemix.org/Test", "Echo"));
        container.activateComponent(asEcho);

        // Deploy Consumer SU
        URL url = getClass().getClassLoader().getResource("consumer/jms.wsdl");
        File path = new File(new URI(url.toString()));
View Full Code Here

        JmsComponent component = new JmsComponent();
        container.activateComponent(component, "JMSComponent");

        // Add an echo component
        EchoComponent echo = new EchoComponent();
        ActivationSpec asEcho = new ActivationSpec("receiver", echo);
        asEcho.setService(new QName("http://jms.servicemix.org/Test", "Echo"));
        container.activateComponent(asEcho);

        // Deploy Provider SU

        URL url = getClass().getClassLoader().getResource("provider/jms.wsdl");
View Full Code Here

        component.getConfiguration().setStreamingEnabled(streaming);
        container.activateComponent(component, "HttpProviderTest");

        // Add a receiver component
        Receiver receiver = new ReceiverComponent();
        ActivationSpec asReceiver = new ActivationSpec("receiver", receiver);
        asReceiver.setService(new QName("test", "receiver"));
        container.activateComponent(asReceiver);

        // Add the http receiver
        HttpConnector connector = new HttpConnector("localhost", 8192);
        connector.setDefaultInOut(false);
        ActivationSpec asConnector = new ActivationSpec("connector", connector);
        asConnector.setDestinationService(new QName("test", "receiver"));
        container.activateComponent(asConnector);

        // Start container
        container.start();
View Full Code Here

        component.getConfiguration().setStreamingEnabled(streaming);
        container.activateComponent(component, "HttpProviderTest");

        // Add a receiver component
        Receiver receiver = new ReceiverComponent();
        ActivationSpec asReceiver = new ActivationSpec("receiver", receiver);
        asReceiver.setService(new QName("test", "receiver"));
        container.activateComponent(asReceiver);

        // Add the http receiver
        HttpConnector connector = new HttpConnector("localhost", 9192);
        connector.setDefaultInOut(false);
        ActivationSpec asConnector = new ActivationSpec("connector", connector);
        asConnector.setDestinationService(new QName("test", "receiver"));
        container.activateComponent(asConnector);

        // Start container
        container.start();
View Full Code Here

        component.getConfiguration().setStreamingEnabled(streaming);
        container.activateComponent(component, "HTTPComponent");

        // Add a echo component
        EchoComponent echo = new EchoComponent();
        ActivationSpec asReceiver = new ActivationSpec("echo", echo);
        asReceiver.setService(new QName("test", "echo"));
        container.activateComponent(asReceiver);

        // Add the http receiver
        HttpConnector connector = new HttpConnector("localhost", 8192);
        connector.setDefaultInOut(true);
        ActivationSpec asConnector = new ActivationSpec("connector", connector);
        asConnector.setDestinationService(new QName("test", "echo"));
        container.activateComponent(asConnector);

        // Start container
        container.start();
View Full Code Here

        // JMS Component
        JmsComponent component = new JmsComponent();
        container.activateComponent(component, "JMSComponent1");
       
        // Add a receiver component
        ActivationSpec asEcho = new ActivationSpec("echo", new EchoComponent() {
            public Document getServiceDescription(ServiceEndpoint endpoint) {
                try {
                    Definition def = WSDLFactory.newInstance().newDefinition();
                    PortType type = def.createPortType();
                    type.setUndefined(false);
                    type.setQName(new QName("http://test", "MyConsumerInterface"));
                    Binding binding = def.createBinding();
                    binding.setQName(new QName("http://test", "MyConsumerBinding"));
                    binding.setUndefined(false);
                    binding.setPortType(type);
                    Service svc = def.createService();
                    svc.setQName(new QName("http://test", "MyConsumerService"));
                    Port port = def.createPort();
                    port.setBinding(binding);
                    port.setName("myConsumer");
                    svc.addPort(port);
                    def.setTargetNamespace("http://test");
                    def.addNamespace("tns", "http://test");
                    def.addPortType(type);
                    def.addBinding(binding);
                    def.addService(svc);
                    return WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        });
        asEcho.setEndpoint("myConsumer");
        asEcho.setService(new QName("http://test", "MyConsumerService"));
        container.activateComponent(asEcho);
       
        // Deploy SU
        URL url = getClass().getClassLoader().getResource("xbean/xbean.xml");
        File path = new File(new URI(url.toString()));
View Full Code Here

            jbi.shutDown();
        }
    }

    protected void registerCreditAgency() throws Exception {
        ActivationSpec creditAgency = new ActivationSpec();
        creditAgency.setInterfaceName(new QName("urn:logicblaze:soa:creditagency", "CreditAgency"));
        creditAgency.setComponent(new CreditAgency());
        jbi.activateComponent(creditAgency);
    }
View Full Code Here

        jbi.activateComponent(creditAgency);
    }

    protected void registerBanks() throws Exception {
        for (int i = 1; i <= 5; i++) {
            ActivationSpec bank = new ActivationSpec();
            bank.setInterfaceName(new QName("urn:logicblaze:soa:bank", "Bank"));
            bank.setComponent(new Bank(i));
            jbi.activateComponent(bank);
        }
    }
View Full Code Here

                }

                return true;
            }
        };
        ActivationSpec asReceiver = new ActivationSpec("rmiComponent", rmiComponent);
        asReceiver.setService(new QName("urn:HttpInvoker", "Endpoint"));
        container.activateComponent(asReceiver);

        // Start the JBI container
        container.start();
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.container.ActivationSpec

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.