diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-22 16:52:57 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-22 16:52:57 +0000 |
commit | 76f33c9cd9b1ca39509e9ca956d5596901138df2 (patch) | |
tree | 9d2aee2a548c2b9eae0ad741e0895b6235d17cf9 /branches/sca-java-1.x/modules/assembly-xml | |
parent | 0552a30cb71d1ecf4209d88a0d0c2306e149f532 (diff) |
TUSCANY-3052 - Correct the way that JEEImplementations are represented so that they appear as composites. In that way an application composite, when present, can naturally be included in the component hierarchy. When an application composite isn't present then the composite is created on the fly based on the information from the introspected archive.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@777618 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/assembly-xml')
-rw-r--r-- | branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index c4528e0bf2..2297b06a2d 100644 --- a/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/branches/sca-java-1.x/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -56,6 +56,7 @@ import org.apache.tuscany.sca.assembly.Property; import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.Wire; +import org.apache.tuscany.sca.assembly.impl.CompositeImpl; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.ContributionFactory; import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; @@ -682,7 +683,10 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt // Write the component implementation Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { + // check that we really have CompositeImpl and treat this specially. Some + // extension extend CompositeImpl and we want these to be treated by the extension + // processor. + if ((implementation != null ) && (implementation.getClass().equals(CompositeImpl.class))) { writeStart(writer, IMPLEMENTATION_COMPOSITE, new XAttr(NAME, ((Composite)implementation).getName())); //write extended attributes |