Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCAContribution


           
            // ====================================================================
            // run the chosen composite  
            SCAContribution [] contributions = new SCAContribution[contributionsToDeploy.size()];
            for (int i = 0; i < contributionsToDeploy.size(); i++) {
                contributions[i] = new SCAContribution(contributionsToDeploy.get(i).getURI(), contributionsToDeploy.get(i).getLocation());
            }
                  
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
           
            SCANode node = nodeFactory.createSCANode(chosenDeployableLocation, contributions);
View Full Code Here


        if (composites != null && composites.length > 1) {
            // Create an aggregated composite that includes all the composites as Node API only takes one composite
            String content = createDeploymentComposite(applicationClassLoader, composites);
            // Create SCA contributions
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            node =
                factory.createSCANode("http://tuscany.apache.org/xmlns/sca/1.0/aggregated", content, contributions
                    .toArray(new SCAContribution[contributions.size()]));
        } else {
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            String composite = (composites != null && composites.length >= 1) ? composites[0] : null;
            if (!contributions.isEmpty()) {
                node =
                    factory.createSCANode(composite, contributions.toArray(new SCAContribution[contributions.size()]));
View Full Code Here

                }
            }
           
            SCANodeFactory factory = SCANodeFactory.newInstance();
            SCANode node = factory.createSCANode(null,
                                                 new SCAContribution("contrib2wsdl", contributionPath));
           
            // Print out all generated WSDL
            // today this means finding all services in the deployment composites
            // that have a binding.ws configured
            printWSDL(((NodeImpl)node).getComposite());
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        try {
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
            node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
                                 new SCAContribution("TestContribution",
                                                     new File("src/main/resources/DuplicateReferenceName").toURL().toString()));
            node.start();
            calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
        } catch (ServiceRuntimeException ex) {
            if (ex.getMessage().equals("org.osoa.sca.ServiceRuntimeException: Duplicate component reference name: Component = CalculatorServiceComponent Reference = addService")){
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsdefault/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsobject/helloworld.composite",
                new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmstextxmlinjmsobjectout/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsbytesxml/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsbytes/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

        if (composites != null && composites.length > 1) {
            // Create an aggregated composite that includes all the composites as Node API only takes one composite
            String content = createDeploymentComposite(applicationClassLoader, composites);
            // Create SCA contributions
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            node =
                factory.createSCANode("http://tuscany.apache.org/xmlns/sca/1.0/aggregated", content, contributions
                    .toArray(new SCAContribution[contributions.size()]));
        } else {
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            String composite = (composites != null && composites.length >= 1) ? composites[0] : null;
            if (!contributions.isEmpty()) {
                node =
                    factory.createSCANode(composite, contributions.toArray(new SCAContribution[contributions.size()]));
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.SCAContribution

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.