summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
index a88f414c0f..f16d607a80 100644
--- a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
+++ b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
@@ -249,7 +249,14 @@ class EquinoxHost {
Bundle bundle = allBundles.get(bundleName);
if (bundle == null) {
long installStart = currentTimeMillis();
- bundle = bundleContext.installBundle(bundleFile);
+ String location = bundleFile;
+ if (bundleFile.startsWith("file:")) {
+ File target = file(new URL(bundleFile));
+ // Use a special "reference" scheme to install the bundle as a reference
+ // instead of copying the bundle
+ location = "reference:file:/" + target.getPath();
+ }
+ bundle = bundleContext.installBundle(location);
if (logger.isLoggable(Level.FINE)) {
logger.fine("Bundle installed in " + (currentTimeMillis() - installStart) + " ms: " + string(bundle, false));
}