Package org.apache.tuscany.sca.deployment

Examples of org.apache.tuscany.sca.deployment.Deployer.createMonitor()


    public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException {
        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
        Node node = tuscanyRuntime.createNode("myDomain");
       
        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();
View Full Code Here


        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();
        composite.setURI("helloworld2.composite");
        node.start("foo", composite);
        List<String> dcs = node.getStartedCompositeURIs("foo");
View Full Code Here

    @Test
    public void testRead() throws Exception {
        Deployer deployer = new DefaultDeployer();
        File file = new File("../../../samples/learning-more/binding-sca/calculator-contribution/target/sample-binding-sca-calculator-contribution.jar");
        URL url = file.toURI().toURL();
        Monitor monitor = deployer.createMonitor();
        Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor);
        deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
       
        // Ferkle around in the contribution verifying it looks as expected
        Assert.assertNotNull(contribution);
View Full Code Here

    public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        Node node = nodeFactory.createNode("myDomain");
       
        Deployer deployer = nodeFactory.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.getInstalledContributions();
View Full Code Here

        Node node = nodeFactory.createNode("myDomain");
       
        node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true);

        Deployer deployer = nodeFactory.getDeployer();
        Monitor monitor = deployer.createMonitor();
        Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor);
        monitor.analyzeProblems();
        composite.setURI("helloworld2.composite");
        node.addDeploymentComposite("foo", composite);
        List<String> dcs = node.getDeployedComposites("foo");
View Full Code Here

    @Test
    public void testRead() throws Exception {
        Deployer deployer = new DefaultDeployer();
        File file = new File("src/test/resources/sample-binding-sca-calculator-contribution.jar");
        URL url = file.toURI().toURL();
        Monitor monitor = deployer.createMonitor();
        Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor);
        deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
       
        // Ferkle around in the contribution verifying it looks as expected
        Assert.assertNotNull(contribution);
View Full Code Here

    public void testBuild() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        Deployer deployer = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Deployer.class);
        URL r = getClass().getResource("/test.composite");
        r = new URL(r, "../");
        Monitor monitor = deployer.createMonitor();
        Contribution contribution = deployer.loadContribution(URI.create("c1"), r, monitor);
        deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
        int i = 0;
        for (Problem p : monitor.getProblems()) {
            System.err.println(i + ": " + p);
View Full Code Here

                    contributionMetaDatas.put(curi, (ContributionMetadata)deployer.loadXMLDocument(new StringReader(baos.toString())));                   
                }
           }
           zis.close(); // close it so no one tries to reuse the already read stream
        }
        Monitor monitor = deployer.createMonitor();
        try {
            return deployer.getDependencies(contributionMetaDatas, contributionURI, monitor);
        } finally {
            monitor.analyzeProblems();
        }
View Full Code Here

    public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException {
        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
        Node node = tuscanyRuntime.createNode("myDomain");
       
        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);
        List<String> ics = node.getInstalledContributionURIs();
View Full Code Here

        Node node = tuscanyRuntime.createNode("myDomain");
       
        node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null);

        Deployer deployer = tuscanyRuntime.getDeployer();
        Monitor monitor = deployer.createMonitor();
        Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor);
        monitor.analyzeProblems();
        String cmpuri = node.addDeploymentComposite("foo", composite);
        node.startComposite("foo", cmpuri);
        Map<String, List<String>> dcs = node.getStartedCompositeURIs();
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.