Examples of analyzeProblems()


Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

        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();
        Assert.assertEquals(1, ics.size());
        Assert.assertEquals("foo", ics.get(0));
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

        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");
        Assert.assertEquals(1, dcs.size());
        Assert.assertEquals("helloworld2.composite", dcs.get(0));
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

// TODO: is the ContextMonitor neccessary here?        
//        Monitor tcm = monitorFactory.setContextMonitor(monitor);
//        try {
           
            domainComposite = deployer.build(contribution, dependedOnContributions, new HashMap<QName, List<String>>(), monitor);
            monitor.analyzeProblems();

//        } finally {
//            monitorFactory.setContextMonitor(tcm);
//        }
       
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

        if (uri == null) {
            uri = getDefaultContributionURI(contributionURL);
        }
        Monitor monitor = deployer.createMonitor();
        Contribution contribution = deployer.loadContribution(IOHelper.createURI(uri), IOHelper.getLocationAsURL(contributionURL), monitor);
        monitor.analyzeProblems();
        if (metaDataURL != null) {
            mergeContributionMetaData(metaDataURL, contribution);
        }
        installContribution(contribution, dependentContributionURIs, startDeployables);
        return uri;
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

        try {
            metaData = deployer.loadXMLDocument(IOHelper.getLocationAsURL(metaDataURL), monitor);
        } catch (Exception e) {
            throw new ValidationException(e);
        }
        monitor.analyzeProblems();
        contribution.getDeployables().addAll(metaData.getDeployables());
        contribution.getImports().addAll(metaData.getImports());
        contribution.getExports().addAll(metaData.getExports());
    }
   
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

            try {
                deployer.resolve(contribution, dependentContributions, monitor);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            monitor.analyzeProblems();
        }
        return ic.getURI();
    }

    protected List<Contribution> calculateDependentContributions(InstalledContribution ic) {
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

    }

    public String start(String contributionURI, Reader compositeXML) throws ContributionReadException, XMLStreamException, ActivationException, ValidationException {
        Monitor monitor = deployer.createMonitor();
        Composite composite = deployer.loadXMLDocument(compositeXML, monitor);
        monitor.analyzeProblems();
        return start(contributionURI, composite);
    }

    public String start(String contributionURI, Composite composite) throws ActivationException, ValidationException {
        InstalledContribution ic = installedContributions.get(contributionURI);
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

    }

    public Object loadXMLDocument(Reader document) throws XMLStreamException, ContributionReadException, ValidationException {
        Monitor monitor = createMonitor();
        Object model = loadXMLDocument(document, monitor);
        monitor.analyzeProblems();
        return model;
    }
   
    public Object loadXMLDocument(Reader document, Monitor monitor) throws XMLStreamException, ContributionReadException {
        init();
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

            bs.put(new QName("default"), Arrays.asList(new String[]{domainRegistry.getDomainName()}));
        }

        Monitor monitor = deployer.createMonitor();
        builtComposite = deployer.build(contributions, dependedOnContributions, bs, monitor);
        monitor.analyzeProblems();

        // TODO: Ideally deployer.build would set the name and uri to what this needs
        builtComposite.setName(composite.getName());
        builtComposite.setURI(composite.getURI());
        builtComposite.setContributionURI(composite.getContributionURI());
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()

        try {
            metaData = deployer.loadXMLDocument(IOHelper.getLocationAsURL(metaDataURL), monitor);
        } catch (Exception e) {
            throw new ValidationException(e);
        }
        monitor.analyzeProblems();
        contribution.mergeMetaData(metaData);
    }
   
    /**
     * Peek into the contribution to find its attributes.
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.