Package org.apache.tuscany.sca.contribution.service

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://sample/crud", "crud"));
       
View Full Code Here


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

        ModelResolver helloResolver = new ModelResolverImpl(cl);
        File helloContrib = new File("./target/classes/");
        URL helloURL = helloContrib.toURL();
        Contribution consumerContribution =
            contributionService.contribute("http://import-export/hello", helloURL, helloResolver, false);
        Composite consumerComposite = consumerContribution.getDeployables().get(0);
        domain.getDomainComposite().getIncludes().add(consumerComposite);
        domain.getCompositeBuilder().build(consumerComposite);

        // Start Components from my composite
View Full Code Here

        // Contribute the SCA contribution
        ContributionService contributionService = domain.getContributionService();

        helloContribution =
            contributionService.contribute("http://import-export/export-composite", helloContribution_URL, false);
       
        for (Composite deployable : helloContribution.getDeployables()) {
            domain.getDomainComposite().getIncludes().add(deployable);
            domain.getCompositeBuilder().build(deployable);
        }
View Full Code Here

            domain.getCompositeActivator().activate(deployable);
            domain.getCompositeActivator().start(deployable);
        }

        helloWorldContribution_one =
            contributionService.contribute("http://import-export/helloworld_one", helloWorldContribution_one_URL, false);
        for (Composite deployable : helloWorldContribution_one.getDeployables()) {
            domain.getDomainComposite().getIncludes().add(deployable);
            domain.getCompositeBuilder().build(deployable);
        }
View Full Code Here

                }
            }

            // Load the contribution
            logger.log(Level.INFO, "Loading contribution: " + contributionURL);
            contributions.add(contributionService.contribute(contribution.getURI(), contributionURL, false));
            analyzeProblems();
        }

        composite = configuration.getComposite();
       
View Full Code Here

                }
            }

            // Load the contribution
            logger.log(Level.INFO, "Loading contribution: " + contributionURL);
            contributions.add(contributionService.contribute(contribution.getURI(), contributionURL, false));
            analyzeProblems();
        }

        composite = configuration.getComposite();
View Full Code Here

        if (contributionURL != null) {
          // Get ready to add contributions to the domain
          ContributionService contributionService = nodeRuntime.getContributionService();
         
          // Contribute the SCA application
          Contribution contribution = contributionService.contribute(contributionURL.toExternalForm(),
                                                                     contributionURL,
                                                                     modelResolver,
                                                                     false);
         
          contributions.put(contributionURL, contribution);
View Full Code Here

            // 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, //resolver,
                                                                       false);
            Composite composite = contribution.getDeployables().get(0);

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

           
                // add node composite to the management domain
                ContributionService contributionService = managementRuntime.getContributionService();
                Contribution contribution = null;

              contribution = contributionService.contribute(nodeUri,
                                                            contributionURL,
                                                            false);
               
                if (contribution.getDeployables().size() != 0) {
                    Composite composite = contribution.getDeployables().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.