From b4ea75787732a084ee1df3a4ce97293ad96cde41 Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 24 Oct 2008 06:43:56 +0000 Subject: 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 --- .../apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher') 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)); } -- cgit v1.2.3