Examples of installContribution()


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

        Deployer deployer = tuscanyRuntime.getDeployer();
        Monitor monitor = deployer.createMonitor();
        Contribution contribution = deployer.loadContribution(URI.create("foo"), new File("src/test/resources/sample-helloworld-nodeployable.jar").toURI().toURL(), monitor);
        monitor.analyzeProblems();
       
        node.installContribution(contribution, null, true);
        List<String> ics = node.getInstalledContributionURIs();
        Assert.assertEquals(1, ics.size());
        Assert.assertEquals("foo", ics.get(0));
    }
View Full Code Here

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

    @Test
    public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException {
        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
        Node node = tuscanyRuntime.createNode("myDomain");
       
        node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true);

        Deployer deployer = tuscanyRuntime.getDeployer();
        Monitor monitor = deployer.createMonitor();
        Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor);
        monitor.analyzeProblems();
View Full Code Here

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

           
            Node node = runtime.createNode(domainURI);
            for (String c : contributionList) {
                String curi;
                try {
                    curi = node.installContribution(null, c, null, null);
                } catch (Exception e) {
                    throw new MojoExecutionException("Exception installing contribution", e);
                }
                try {
                    node.startDeployables(curi);
View Full Code Here

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

public class TuscanyRuntimeTestCase {

    @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.installContribution()

    }

    @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());
View Full Code Here

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

public class ContributionUpdateTestCase {

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

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

    }

    @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());
View Full Code Here

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

    @Test
    @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");
View Full Code Here

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

    @Test
    @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.installContribution()

    }

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

        try {
            node.getService(Helloworld.class, "HelloworldComponent");
            Assert.fail();
        } catch (NoSuchServiceException 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.