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
This commit is contained in:
parent
fe85e4d6a0
commit
b4ea757877
1 changed files with 8 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue