summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-09-26 10:45:36 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-09-26 10:45:36 +0000
commit0c5ca72a7e5dba56a0456ea362aa5c248ec855c7 (patch)
tree6125a02be364041714cf67457d38bb4453fd5e6f /sca-java-2.x/trunk
parent319187c87be09000e7b849045395be967aa5999b (diff)
When doing validateContribution if a contribution classloader has been created then set it on the contribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1175782 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
index 6b601da19d..d8369e7975 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
@@ -47,6 +47,9 @@ import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.resolver.ClassReference;
+import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.deployment.Deployer;
@@ -324,6 +327,12 @@ public class NodeImpl implements Node {
loadedContributions.remove(cd.getURI());
throw e;
}
+ if (contribution.getClassLoader() == null && contribution.getModelResolver() instanceof ExtensibleModelResolver) {
+ ModelResolver o = ((ExtensibleModelResolver)contribution.getModelResolver()).getModelResolverInstance(ClassReference.class);
+ if (o instanceof ClassLoader) {
+ contribution.setClassLoader((ClassLoader)o);
+ }
+ }
}
public Map<String, List<String>> getStartedCompositeURIs() {