Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Should osgi deprecate the location term?


Ben

In the bug report I stated that the location value passed to installBundle can be ANY String.  The spec says nothing about this having to be a valid URL (string) or file path location (string).  The Framework is free to interpret the location string however it wants when installing a bundle with the single argument installBundle(String location) method.  Most implementations try to create a new URL with the location string to open an input stream for the content of the bundle.  But frameworks are free to do other things when interpreting the "location".  From the javadoc of BundleContext#installBundle(String) ...

Installs a bundle from the specified location string. A bundle is obtained from location as interpreted by the Framework in an implementation dependent manner.
Every installed bundle is uniquely identified by its location string, typically in the form of a URL.

As you can see the location string has no spec'ed format, it says that it is typically in the form of a URL, but this is not required.  The framework is free to interpret the location in anyway it sees fit.  I'm almost inclined to say that the single argument installBundle(String) method should be deprecated because you cannot guarantee the behavior across all frameworks.

Tom





breed@xxxxxxxxxxxxxxx
Sent by: equinox-dev-bounces@xxxxxxxxxxx

02/14/2006 12:15 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
Subject
Re: [equinox-dev] Should osgi deprecate the location term?






I think the problem is a little bit deeper. In some cases it really is a location: the one parameter BundleContext.installBundle and the no parameter Bundle.update. I think the bug misstates the issue a bit. Tom, you seem to imply that a location must be a URL, which I think is a rather narrow view of location. Also a URL can always be mapped to a string, so it can (should) be used as a location.


It seems to me that the problem you are alluding to in the bug has more to do with it's misuse as a way of keeping meta data information about a bundle than poor location semantics.


ben



Thomas Watson/Austin/IBM@IBMUS
Sent by: equinox-dev-bounces@xxxxxxxxxxx

02/14/2006 09:39 AM
Please respond to Equinox development mailing list

       
       To:        Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

       cc:        

       Subject:        [equinox-dev] Should osgi deprecate the location term?





Was "Fw: [Bug 126517] New source lookup is broken"


I opened an issue against OSGi to discuss this topic for the next specification release.


Tom



Jeff McAffer <Jeff_McAffer@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

02/11/2006 07:44 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To equinox-dev@xxxxxxxxxxx
cc
Subject [equinox-dev] Fw: [Bug 126517] New source lookup is broken










Should we put this on the list of things to propose in the next version of the OSGi spec?  deprecate getLocation() (and the use of the term location) and replace with getInstallKey() or some such?  This always crops up and confuses people.


Jeff


----- Forwarded by Jeff McAffer/Ottawa/IBM on 02/11/2006 08:41 PM -----
bugzilla-daemon@xxxxxxxxxxx

02/06/2006 05:01 PM


To Jeff McAffer/Ottawa/IBM@IBMCA
cc
Subject [Bug 126517] New source lookup is broken











https://bugs.eclipse.org/bugs/show_bug.cgi?id=126517
Product/Component: PDE / UI





------- Comment #6 from tjwatson@xxxxxxxxxx  2006-02-06 16:59 -------
'location' is used to hold the poorly named OSGi concept of bundle location
(see Bundle#getLocation).  This value is assigned by the caller to
BundleContext#installBundle.  

The location string can be anything, it does not have to be a well formed URL
string or file path string.  Therefore we cannot merge the two.  The best
definition I can come up with for the true meaning of bundle location would be
"install key".  It is a key assigned by the installer (not the framework) at
install time.  Update uses keys starting with "update@" so they can easily tell
what bundles they manage.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee._______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top