diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-24 06:43:56 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-24 06:43:56 +0000 |
commit | b4ea75787732a084ee1df3a4ce97293ad96cde41 (patch) | |
tree | 57ebd644edf3f1088f99b75085e06c327ecc1079 /branches/sca-equinox/modules/node-launcher-equinox/src | |
parent | fe85e4d6a072ecbe175e9e602d05b6ad345226ab (diff) |
Use "reference:" scheme to install bundles from the orginal location without copying
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@707563 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 9 |
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)); } |