From 87e69e61ada2e05e58519225ceb984510b3cd1a7 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 20 Dec 2011 19:30:45 +0000 Subject: TUSCANY-3998: Apply revised patch from Greg Dritschler to provide a way to override Tuscany system definition.xml documents git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1221453 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/extensibility/equinox/EquinoxServiceDiscoverer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk') diff --git a/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java b/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java index 370565e09c..9e9270e461 100644 --- a/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java +++ b/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java @@ -172,7 +172,12 @@ public class EquinoxServiceDiscoverer implements ServiceDiscoverer { public URL getResource(final String name) { return AccessController.doPrivileged(new PrivilegedAction() { public URL run() { - return bundle.getResource(name); + // Search bundle first using getEntry() + URL url = bundle.getEntry(name); + // If not found in bundle, try getResource() which looks at imports + if (url == null) + url = bundle.getResource(name); + return url; } }); } -- cgit v1.2.3