[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] appending reference to url passed toBundleContext.installBundle

Hi Thomas, 
Thanks a lot for your reply.
Actually I am dealing a performance issue with some custom bundle loading/installing code.

So with 'reference' install i am getting a huge performance improvement. So is it the case? or its just that I am dealing with a badly written code :|

I have some 700 jars in a folder that and its not fixed can be added/removed by the user. The code is written as such it will loop over the list of jars present in the directory. Install the bundle one by one. If the bundle already loaded then it is uninstalled.

Currently, 'reference' is not used. But with 'reference' I got a huge performance improvement. Is it expected? 
Regards, Yash Bagadia

On Tuesday, 7 February 2017 6:57 PM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:

A 'reference' install will not copy the content of the bundle file into the framework's internal storage.  Instead it will load the bundle directly out of the file URL the 'reference' URL is pointing to.  Note that 'reference' URLs only support embedded 'file' URLs (not http etc.)  This has advantages for management agents that manage bundles in their own bundle store on disk and you want to avoid double copies of the bundle on disk when they are installed into the framework.
Any non-reference URL will copy the content of the bundle into the framework's internal storage.  This allows the original content to be deleted after installation and the bundle will remain functional and installed within the framework.

----- Original message -----
From: Yash Bagadia <bagadia.yash@xxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
To: "equinox-dev@xxxxxxxxxxx" <equinox-dev@xxxxxxxxxxx>
Subject: [equinox-dev] appending reference to url passed to BundleContext.installBundle
Date: Tue, Feb 7, 2017 3:33 AM
I have observed there are 2 ways to pass url to BundleContext.installBundle function as below:
String installURL1 = "file:///abc/def.jar;
 String installURL2 = "reference:file:abc/def.jar";
What is the difference in these 2 and which one is recommended?
Yash Bagadia
equinox-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit