summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-23 06:28:01 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-23 06:28:01 +0000
commit4aa0b8bca183523fab66e655ae6652bfea42255d (patch)
tree0db580233dd983572d78c9e9ca2fce51fa2784e7 /sca-java-2.x/trunk
parent9035a82d24ae4efe29a1bb414b627b00a5b24d73 (diff)
Set the Composites contribution URI when its being read
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1126327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
index 320db7ab82..55a31e1bc0 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
@@ -66,12 +66,10 @@ import java.util.List;
import java.util.StringTokenizer;
import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMSource;
import javax.xml.xpath.XPathExpressionException;
import org.apache.tuscany.sca.assembly.Binding;
@@ -186,6 +184,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
Callback callback = null;
QName name = null;
Monitor monitor = context.getMonitor();
+ Contribution contribution = context.getContribution();
try {
// Read the composite document
while (reader.hasNext()) {
@@ -199,6 +198,9 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
// Read a <composite>
composite = assemblyFactory.createComposite();
composite.setSpecVersion(Constants.SCA11_NS);
+ if (contribution != null) {
+ composite.setContributionURI(contribution.getURI());
+ }
composite.setName(new QName(getURIString(reader, TARGET_NAMESPACE), getString(reader, NAME)));