Examples of contribute()


Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

        ContributionService contributionService = domain.getContributionService();
       
        //File javaContribLocation = new File("../export-java/target/classes");
        //URL javaContribURL = javaContribLocation.toURL();
        URL javaContribURL = getContributionURL(HelloWorldService.class);
        javaContribution = contributionService.contribute("http://import-export/export-java", javaContribURL, false);
        for (Composite deployable : javaContribution.getDeployables()) {
            domain.getDomainComposite().getIncludes().add(deployable);
            domain.buildComposite(deployable);
        }
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

        }

        //File helloWorldContribLocation = new File("./target/classes/");
        //URL helloWorldContribURL = helloWorldContribLocation.toURL();
        URL helloWorldContribURL = getContributionURL(HelloWorldImpl.class);
        helloWorldContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
        for (Composite deployable : helloWorldContribution.getDeployables()) {
            domain.getDomainComposite().getIncludes().add(deployable);
            domain.buildComposite(deployable);
        }
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

            // find the current directory as a URL. This is where our contribution
            // will come from
            URL contributionURL = Thread.currentThread().getContextClassLoader().getResource(nodeName + "/");

            // Contribute the SCA application
            Contribution contribution = contributionService.contribute("http://calculator", contributionURL, null, false);
            appComposite = contribution.getDeployables().get(0);

            // Add the deployable composite to the domain
            nodeComposite.getIncludes().add(appComposite);
            nodeRuntime.buildComposite(appComposite);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

                }
            }

            // Load the contribution
            logger.log(Level.INFO, "Loading contribution: " + contributionURL);
            contributions.add(contributionService.contribute(contribution.getURI(), contributionURL, false));
            analyseProblems();
        }
       
        // Resolve the metadata within the context of the first contribution
        Contribution mainContribution = contributions.get(contributions.size() - 1);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

        ContributionService contributionService = scaDomain.getContributionService();
        for (URL jar : contributionJars) {
            InputStream is = null;
            try {
                is = jar.openStream();
                contribution = contributionService.contribute(jar.toString(), jar, is);
            } catch (Exception e) {
                System.err.println("exception adding contribution: " + jar);
                e.printStackTrace();
            }
            if (is != null) {
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

            // will come from
            String contributionDirectory = nodeName.substring(nodeName.lastIndexOf('/') + 1);
            URL contributionURL = Thread.currentThread().getContextClassLoader().getResource(contributionDirectory + "/");

            // Contribute the SCA application
            Contribution contribution = contributionService.contribute("http://calculator", contributionURL, null, //resolver,
                                                                       false);
            appComposite = contribution.getDeployables().get(0);

            // Add the deployable composite to the domain
            nodeComposite.getIncludes().add(appComposite);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

          //FIXME What to do when a contribution uses a separate class loader ? (e.g contributionClassLoader != null)
           
            // Add the contribution to the node
            ContributionService contributionService = nodeRuntime.getContributionService();
            Contribution contribution = contributionService.contribute(contributionURI,
                                                                       contributionURL,
                                                                       false);
           
            // remember the contribution
            contributions.put(contributionURI, contribution);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

        url = url.substring(0, url.length()-8);
       
        // Contribute the SCA contribution
        TestModelResolver myResolver = new TestModelResolver(myClassLoader);
        ContributionService contributionService = domain.getContributionService();
        Contribution contribution = contributionService.contribute("http://test/contribution", new URL(url), myResolver, false);
        assertNotNull(contribution);
       
        // Decide which SCA composite I want to deploy
        Composite myComposite = myResolver.getComposite(new QName("http://test", "test"));
       
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

        url = url.substring(0, url.length()-8);
       
        // Contribute the SCA contribution
        TestModelResolver myResolver = new TestModelResolver(myClassLoader);
        ContributionService contributionService = domain.getContributionService();
        Contribution contribution = contributionService.contribute("http://test/contribution", new URL(url), myResolver, false);
        assertNotNull(contribution);
       
        // Decide which SCA composite I want to deploy
        Composite myComposite = myResolver.getComposite(new QName("http://test", "test"));
       
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()

                }
            }
           
            // Load the contribution
            logger.log(Level.INFO, "Loading contribution: " + contributionURL);
            contributions.add(contributionService.contribute(contribution.getURI(), contributionURL, false));
        }
       
        // Load the specified composite
        StAXArtifactProcessor<Composite> compositeProcessor = artifactProcessors.getProcessor(Composite.class);
        URL compositeURL = new URL(configuration.getComposite().getURI());
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.