Author: rfeng
Date: Thu Oct 23 23:43:56 2008
New Revision: 707563

URL: http://svn.apache.org/viewvc?rev=707563&view=rev
Log:
Use "reference:" scheme to install bundles from the orginal location without 
copying

Modified:
    
tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java

Modified: 
tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java?rev=707563&r1=707562&r2=707563&view=diff
==============================================================================
--- 
tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
 (original)
+++ 
tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
 Thu Oct 23 23:43:56 2008
@@ -249,7 +249,14 @@
                 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));
                     }


Reply via email to