Examples of stopComposite()


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

        Assert.assertEquals(1, ci.size());

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));

        node.stopComposite("helloworld", "helloworld.composite");
        try {
            node.getService(Helloworld.class, "HelloworldComponent");
            Assert.fail();
        } catch (NoSuchServiceException e) {
            // expected as there is no deployables
View Full Code Here

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

        node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null);
        List<String> dcs = node.startDeployables("foo");
        Assert.assertEquals(1, dcs.size());
        Map<String, List<String>> dcsx = node.getStartedCompositeURIs();
        Assert.assertEquals(1, dcsx.size());
        node.stopComposite("foo", "helloworld.composite");
        dcsx = node.getStartedCompositeURIs();
        Assert.assertEquals(0, dcsx.size());
    }

    @Test
View Full Code Here

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

        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());
        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.stopComposite()

        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");
    }

    @Ignore("TUSCANY-3953")
    @Test
    public void startDistributedTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, InterruptedException {
View Full Code Here

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

        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());
        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.stopComposite()

        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");
    }

    @Test
    public void startDistributedTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, InterruptedException {
        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
View Full Code Here

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

        Node node1 = runtime.createNode("uri:StartStopTestCase?wka=127.0.0.1:9876");
        Assert.assertEquals("Hello Amelia", node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia"));
       
        String curi = node1.getInstalledContributionURIs().get(0);
       
        node1.stopComposite(curi, "Helloworld.composite");
        try {
            node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia");
            Assert.fail();
        } catch (NoSuchServiceException e) {
            // expected
View Full Code Here

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

        int count = 3000;
        long start = System.currentTimeMillis();
        for (int i=0; i<count; i++) {
            node.startComposite("sample-helloworld", "helloworld.composite");
            node.stopComposite("sample-helloworld", "helloworld.composite");
        }
        long total = System.currentTimeMillis() - start;
        System.out.println(count + " = " + total + " = " + total / (double)count);

        // test it still works
View Full Code Here

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

            if ("start".equals(command)) {
                node.startComposite(contributionURI, compositeURI);
                response = "Started.";
            } else if ("stop".equals(command)) {
                node.stopComposite(contributionURI, compositeURI);
                response = "Stopped.";
            } else {
                response = "Unknown command: " + command;
            }
        } catch (Exception e) {
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.