diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-16 07:50:25 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-16 07:50:25 +0000 |
commit | e76621b6e1a2ad80ddb50b6c521aaa917888a06b (patch) | |
tree | e2cbe210b8f73726d94998f0d10103d5176ed4b3 /sca-java-2.x/trunk/modules/domain-node/src/main/java/org | |
parent | 83eb6de8bfa94a374d30a60dc95b608c13d710f7 (diff) |
Simplify to use the loadDocument method on Deployer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103640 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java index 8263f204c3..b7fcd8a751 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java @@ -196,7 +196,7 @@ public class NodeImpl2 { InstalledContribution ic = getInstalledContribution(contributionURI);
// load it to check its valid composite XML
- Composite composite = compositeFromXML(compositeXML);
+ Composite composite = deployer.loadXMLDocument(compositeXML);
return addDeploymentComposite(ic, composite);
}
@@ -312,7 +312,7 @@ public class NodeImpl2 { String compositeXML = ic.getAdditionalDeployables().get(uri);
Composite composite;
try {
- composite = compositeFromXML(new StringReader(compositeXML));
+ composite = deployer.loadXMLDocument(new StringReader(compositeXML));
} catch (XMLStreamException e) {
throw new ContributionReadException(e);
}
@@ -384,11 +384,4 @@ public class NodeImpl2 { throw new RuntimeException(e);
}
}
-
- protected Composite compositeFromXML(Reader compositeXML) throws XMLStreamException, ContributionReadException, ValidationException {
- Monitor monitor = deployer.createMonitor();
- Composite composite = deployer.loadXMLDocument(compositeXML, monitor);
- monitor.analyzeProblems();
- return composite;
- }
}
|