Examples of startComposite()


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

    @Test
    public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
        node.startComposite("helloworld", "helloworld.composite");

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }
View Full Code Here

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

    @Test
    public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
        node.startComposite("helloworld", "helloworld.composite");

        Map<String, List<String>> ci = node.getStartedCompositeURIs();
        Assert.assertEquals(1, ci.size());

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
View Full Code Here

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

            Assert.fail();
        } catch (NoSuchServiceException e) {
            // expected as there is no deployables
        }
       
        node.startComposite("helloworld", "helloworld.composite");
        helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
View Full Code Here

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

    @Test
    public void updateWithAdditionalDeployablesTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
        Node node = TuscanyRuntime.newInstance().createNode("updateWithAdditionalDeployablesTest");
        String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
        String compURI = node.addDeploymentComposite(curi, new FileReader("src/test/resources/helloworld2.composite"));
        node.startComposite(curi, compURI);
       
        Collection<Endpoint> eps = ((NodeImpl)node).getEndpointRegistry().getEndpoints();
        Assert.assertEquals(1, eps.size());
        Assert.assertEquals("Helloworld2Component#service-binding(Helloworld/Helloworld)", eps.iterator().next().getURI());
       
View Full Code Here

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

    @Ignore("Depdends on itest/T3558 which isn't in the build?")
    public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("store", "../../testing/itest/T3558/src/test/resources/sample-store.jar", null, null);
        node.installContribution("store-client", "../../testing/itest/T3558/src/test/resources/sample-store-client.jar", null, null);
        node.startComposite("store", "store.composite");
        node.startComposite("store-client", "store-client.composite");

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }
View Full Code Here

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

    public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("store", "../../testing/itest/T3558/src/test/resources/sample-store.jar", null, null);
        node.installContribution("store-client", "../../testing/itest/T3558/src/test/resources/sample-store-client.jar", null, null);
        node.startComposite("store", "store.composite");
        node.startComposite("store-client", "store-client.composite");

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }
View Full Code Here

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

            Assert.fail();
        } catch (NoSuchServiceException e) {
            // expected as there is no deployables
        }

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

    @Test
View Full Code Here

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

    @Test
    public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException, NoSuchServiceException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null);
        node.startComposite("helloworld", "helloworld.composite");

        Map<String, List<String>> dcs = node.getStartedCompositeURIs();
        Assert.assertEquals(1, dcs.size());
        Assert.assertEquals("helloworld.composite", dcs.get("helloworld").get(0));
View Full Code Here

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

    public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
        try {
        Node node1 = runtime.createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331");
        node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
        node1.startComposite("helloworld", "helloworld.composite");

        Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331");

        Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
View Full Code Here

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

        contribution.addComposite(composite);

        // Now run the composite with a Tuscany Node
        Node node = tuscanyRuntime.createNode();
        node.installContribution(contribution, null);
        node.startComposite(contribution.getURI(), composite.getURI());

        // test that the service has started and can be invoked
        testService(node, contribution.getClassLoader());

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