Examples of startComposite()


Examples of org.apache.tuscany.sca.Node.startComposite()

        } catch (ValidationException e) {
            // expected
        }
        node.installContribution("src/test/resources/export.jar");
        node.validateContribution("import");
        node.startComposite("import", "helloworld.composite");
        Map<String, List<String>> scs = node.getStartedCompositeURIs();
        Assert.assertEquals(1, scs.size());           
    }

    @Ignore("TUSCANY-3953")
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

    public void startTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/sample-helloworld.jar");
        Assert.assertEquals(0, node.getStartedCompositeURIs().size());

        node.startComposite("sample-helloworld", "helloworld.composite");
        Assert.assertEquals(1, node.getStartedCompositeURIs().size());
        Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
       
        node.stopComposite("sample-helloworld", "helloworld.composite");
//        Assert.assertEquals(0, node.getStartedComposites().size());
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

        Assert.assertEquals(1, node.getStartedCompositeURIs().size());
        Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
       
        node.stopComposite("sample-helloworld", "helloworld.composite");
//        Assert.assertEquals(0, node.getStartedComposites().size());
        node.startComposite("sample-helloworld", "helloworld.composite");
        Assert.assertEquals(1, node.getStartedCompositeURIs().size());
        Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
        node.stopComposite("sample-helloworld", "helloworld.composite");
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

       
        node.stopComposite("sample-helloworld", "helloworld.composite");
        Assert.assertEquals(0, node.getStartedCompositeURIs().size());
        Assert.assertEquals(0, node2.getStartedCompositeURIs().size());

        node2.startComposite("sample-helloworld", "helloworld.composite");
        Assert.assertEquals(1, node.getStartedCompositeURIs().size());
        Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));

        Assert.assertEquals(1, node2.getStartedCompositeURIs().size());
        Assert.assertEquals("helloworld.composite", node2.getStartedCompositeURIs().get("sample-helloworld").get(0));
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

                + "      <implementation.java class=\"sample.HelloworldImpl\"/>"
                + "   </component>"
                + "</composite>";
        String compositeURI = node.addDeploymentComposite(curi, new StringReader(compositeXML));

        node.startComposite(curi, compositeURI);
        Assert.assertEquals(1, node.getStartedCompositeURIs().size());
       
        Composite dc = node.getDomainComposite();
        Assert.assertEquals(1, dc.getIncludes().size());
        Composite runningComposite = dc.getIncludes().get(0);
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

                + "   <component name=\"TestComponent\">"
                + "      <implementation.java class=\"sample.HelloworldImpl\"/>"
                + "   </component>"
                + "</composite>";
        String compositeURI = node.addDeploymentComposite(curi, new StringReader(compositeXML));
        node.startComposite(curi, compositeURI);

//        node.startComposite("sample-helloworld", "helloworld.composite");
//        Assert.assertEquals(1, node.getStartedCompositeURIs().size());
//        Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
//       
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

                + "   <component name=\"TestComponent\">"
                + "      <implementation.java class=\"sample.HelloworldImpl\"/>"
                + "   </component>"
                + "</composite>";
        String compositeURI = node.addDeploymentComposite("export", new StringReader(compositeXML));
        node.startComposite("import", "helloworld.composite");
        node.startComposite("export", compositeURI);
        Assert.assertEquals(2, node.getInstalledContributionURIs().size());
        node.stopCompositeAndUninstallUnused("import", "helloworld.composite");
        Assert.assertEquals(1, node.getInstalledContributionURIs().size());
        node.stopCompositeAndUninstallUnused("export", compositeURI);
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

                + "      <implementation.java class=\"sample.HelloworldImpl\"/>"
                + "   </component>"
                + "</composite>";
        String compositeURI = node.addDeploymentComposite("export", new StringReader(compositeXML));
        node.startComposite("import", "helloworld.composite");
        node.startComposite("export", compositeURI);
        Assert.assertEquals(2, node.getInstalledContributionURIs().size());
        node.stopCompositeAndUninstallUnused("import", "helloworld.composite");
        Assert.assertEquals(1, node.getInstalledContributionURIs().size());
        node.stopCompositeAndUninstallUnused("export", compositeURI);
        Assert.assertEquals(0, node.getInstalledContributionURIs().size());
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

        Contribution contribution = node.getContribution(curi);
        Assert.assertNull(contribution.getClassLoader());
        node.validateContribution(curi);
        ClassLoader cl1 = contribution.getClassLoader();
        Assert.assertNotNull(cl1);
        node.startComposite(curi, "helloworld.composite");
        Assert.assertEquals(cl1, node.getContribution(curi).getClassLoader());
    }
   
}
View Full Code Here

Examples of org.apache.tuscany.sca.Node.startComposite()

    public void includeTest1() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
        Node node = TuscanyRuntime.newInstance().createNode("localTest");
        String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
        String compositeURI = node.addDeploymentComposite(curi, new FileReader("src/test/resources/include.composite"));

        node.startComposite(curi, compositeURI);
       
        List<String> xs = ((NodeImpl)node).updateUsingComposites(curi, "helloworld.composite");
        Assert.assertEquals(1, xs.size());
        Assert.assertEquals("sample-helloworld/include.composite", xs.get(0));
    }
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.