Hi, Simon.
Is it really needed? We already have such logic in the
org.apache.tuscany.sca.assembly.impl.ComponentImpl.clone(). When a composite
is cloned, all the containing components are cloned. If the component
implementation is a composite, then the implementation is cloned too.
Can you check?
Thanks,
Raymond
--------------------------------------------------
From: <[email protected]>
Sent: Monday, October 05, 2009 8:19 AM
To: <[email protected]>
Subject: svn commit: r821834 -
/tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeCloneBuilderImpl.java
Author: slaws
Date: Mon Oct 5 15:19:34 2009
New Revision: 821834
URL: http://svn.apache.org/viewvc?rev=821834&view=rev
Log:
Make sure the components inside the top level includes are cloned. Before
this change all composite implementations of the same type were shared
between the components using them.
Modified:
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeCloneBuilderImpl.java
Modified:
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeCloneBuilderImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeCloneBuilderImpl.java?rev=821834&r1=821833&r2=821834&view=diff
==============================================================================
---
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeCloneBuilderImpl.java
(original)
+++
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeCloneBuilderImpl.java
Mon Oct 5 15:19:34 2009
@@ -47,13 +47,14 @@
// Try to avoid clone for top-level composites that are added
to the domain composite
for (Composite included : composite.getIncludes()) {
cloneIncludes(included);
+ cloneCompositeImplementations(included);
}
} else {
// Clone the includes
cloneIncludes(composite);
+ cloneCompositeImplementations(composite);
}
- cloneCompositeImplementations(composite);
return composite;
}