[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] initial@<url> related

We use "initial@" by design so the boot strap launcher can quickly figure out which bundles it is managing through the osgi.bundles list. We have considered removing the "initial@" from the location (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=233333). My worry is for cases where 1000s of bundles are installed by p2. We need to get past the boot strap code quickly and we do not want to have to sift through 1000s of bundles to figure out of we have any updates to do at startup for the osgi.bundles list.

Your suggestion sounds reasonable but I wonder if it is a good idea to update the bundles on the osgi.bundles list (considered boot strap bundles) outside of the startup code. Either way, please open a bug report to discuss more. Thanks.


Inactive hide details for Alin Dreghiciu ---03/12/2009 05:50:09 PM---Hi guys,Alin Dreghiciu ---03/12/2009 05:50:09 PM---Hi guys,


Alin Dreghiciu <adreghiciu@xxxxxxxxx>


Equinox - General <equinox-dev@xxxxxxxxxxx>


03/12/2009 05:50 PM


[equinox-dev] initial@<url> related

Hi guys,

Can somebody explain or give me some pointers why the location of
bundles installed via the osgi.bundles is prepended with "initial@"?
The "problem" is that this bundles cannot be updated using
Bunlde#update() method or update console command. It will fail with an
java.net.MalformedURLException: no protocol: initial@... exception.
Indeed it fails only for those urls that are not "reference:urls". But
since "reference:" can only be used with file url, for any url that is
not an file url, it will then fail.

Tracking down the problem, in my view a simple change in
BaseAdaptor#mapLocationToURLConnection corrects this problem by
changing the line:
return (new URL(location).openConnection());
if( location.startsWith( "initial@" ) )
 return new URL( location.substring( 8 ) ).openConnection();
 return new URL( location ).openConnection();

Because if location starts with "initial@" it will never be a valid url anyhow.

Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://www.codedragons.com - New Energy for Projects - Great People
working on Great Projects at Great Places
equinox-dev mailing list

GIF image

GIF image