Examples of analyzeProblems()


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

        } catch (Exception e) {
            loadedContributions.remove(cd.getURI());
            throw new RuntimeException(e);
        }
        try {
            monitor.analyzeProblems();
        } catch (ValidationException e) {
            loadedContributions.remove(cd.getURI());
            throw e;
        }
    }
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, runDeployables);
        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 addDeploymentComposite(String contributionURI, Reader compositeXML) throws ContributionReadException, XMLStreamException, ActivationException, ValidationException {
        Monitor monitor = deployer.createMonitor();
        Composite composite = deployer.loadXMLDocument(compositeXML, monitor);
        monitor.analyzeProblems();
        return addDeploymentComposite(contributionURI, composite);
    }

    public String addDeploymentComposite(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()

// 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()

        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();
        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 = 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");
        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()

        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

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

        } catch (Exception e) {
            loadedContributions.remove(cd.getURI());
            throw new RuntimeException(e);
        }
        try {
            monitor.analyzeProblems();
        } catch (ValidationException e) {
            loadedContributions.remove(cd.getURI());
            throw e;
        }
        if (contribution.getClassLoader() == null && contribution.getModelResolver() instanceof ExtensibleModelResolver) {
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.