tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1175782 - /tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
Date Mon, 26 Sep 2011 10:45:36 GMT
Author: antelder
Date: Mon Sep 26 10:45:36 2011
New Revision: 1175782

URL: http://svn.apache.org/viewvc?rev=1175782&view=rev
Log:
When doing validateContribution if a contribution classloader has been created then set it
on the contribution

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java?rev=1175782&r1=1175781&r2=1175782&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
Mon Sep 26 10:45:36 2011
@@ -47,6 +47,9 @@ import org.apache.tuscany.sca.contributi
 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() {



Mime
View raw message