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.

Tom




                                                                       
  From:       Alin Dreghiciu <[email protected]>                    
                                                                       
  To:         Equinox - General <[email protected]>              
                                                                       
  Date:       03/12/2009 05:50 PM                                      
                                                                       
  Subject:    [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: init...@... 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());
with:
if( location.startsWith( "initial@" ) )
{
  return new URL( location.substring( 8 ) ).openConnection();
}
else
{
  return new URL( location ).openConnection();
}

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

Thanx,
--
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
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to