You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2010/09/02 01:00:24 UTC

svn commit: r991751 - /tuscany/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java

Author: rfeng
Date: Wed Sep  1 23:00:24 2010
New Revision: 991751

URL: http://svn.apache.org/viewvc?rev=991751&view=rev
Log:
Allow the location to be out of the contribution root

Modified:
    tuscany/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java?rev=991751&r1=991750&r2=991751&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java Wed Sep  1 23:00:24 2010
@@ -297,6 +297,11 @@ public class SpringXMLComponentTypeLoade
             if (!artifact.isUnresolved()) {
                 resource = new URL(artifact.getLocation());
             } else {
+                // The resource can be out of scope of the contribution root
+                if (parent != null && parent.getLocation() != null) {
+                    resource = new URL(new URL(parent.getLocation()), contextPath);
+                    return resource;
+                }
                 throw new ContributionReadException("Location cannot be resloved: " + contextPath);
             }
         } else {