Chris Graham wrote:
I have been playing around with OSGi and Felix a bit.

One interesting thing I have noticed is that when a Bundle is installed the
'location' parameter (usually a URL) is used to identify it in the
framework. I was wondering if anyone knew why this is used and not the
combination of the Bundle's symbolic name + version? Wouldn't that make more
sense as that combination is indeed 'unique'?

BSN did not exist until R4.

Also, as things stand when a new Bundle is installed using the same
'location' as an existing one it returns the existing installed Bundle with
that location, even though the actual Bundles may be completely different!
However, I do realise that in practice it would be very unusual for two
different Bundles to have the same location but theoretically this is
possible.

Yes, this has been the defined behavior since R1.

Ideally I would have thought it would read the new Bundle's symbolic name +
version and check to see if it is already installed. If not it would then
install it using the provided location and use the combination of symbolic
name + version as a unique key to identify the Bundle.

The behavior cannot be changed now for backwards compatibility reasons.

I realise this is part of the OSGi spec but just wondered if anyone knew why
it has been done this way?

The "location" was never specifically a URL, it just gets interpreted that way by a lot of frameworks. The location was a unique identifier at one time since it was more descriptive than the bundle ID.

-> richard

Hope all that makes sense!

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to