Yes. Location is an opaque string. While the framework may interpret the 
string as a URL to obtain the bits of a bundle, it is otherwise an opaque 
string.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788





From:   "Todorova, Katya" <[email protected]>
To:     Equinox development mailing list <[email protected]>
Date:   2011/06/24 12:13
Subject:        Re: [equinox-dev] Multiple bsnversion in equinox
Sent by:        [email protected]



So location uniqueness is based on simple string comparison? 
I thought Equinox resolves the string passed as location and compares 
files to which locations point... 

So you say that if I install ./temp/my.jar and ./temp/../temp/my.jar it 
will result in two bundles installed and that's the correct behaviour? 

Thanks for your help,
Katya


-----Original Message-----
From: [email protected] [
mailto:[email protected]] On Behalf Of John W Ross
Sent: Friday, June 24, 2011 6:25 PM
To: Equinox development mailing list
Subject: Re: [equinox-dev] Multiple bsnversion in equinox

I'm not sure I understand why you're surprised?

If you install a bundle with the same location and the already installed 
bundle is visible to the context, the install will succeed and you will 
receive a reference to the already installed bundle. If the already 
installed bundle is not visible to the context, the install will fail and 
you will receive a BundleException indicating the operation was rejected 
by a hook. This will happen regardless of the value of the bsnversion 
property because locations must be unique.

If you install a bundle with the same bsn and version as an existing 
bundle, and the location is unique, and the bsnversion property is set to 
'single', the install will fail and you will receive a BundleException 
indicating the bundle is a duplicate. If the bsnversion property is set to 

'multiple', the install will succeed and you will receive a new Bundle 
object with a unique ID. Whether or not the bit source is the same should 
not make any difference as far as I know.

~ John





"Todorova, Katya" <[email protected]> 
Sent by: [email protected]
06/24/2011 08:27 AM
Please respond to
Equinox development mailing list <[email protected]>


To
Equinox development mailing list <[email protected]>
cc

Subject
[equinox-dev] Multiple bsnversion in equinox






Hi, 
 
I start Equinox with org.osgi.framework.bsnversion=multiple and try to 
install one bundle twice:
 
osgi> install reference:
file:C:\eclipses\eclipse-SDK-3.7RC4-win32-x86_64\eclipse\plugins\com.ibm.icu.source_4.4.2.v20110208.jar

Bundle id is 5
 
osgi> install initial@reference:
file:C:\eclipses\eclipse-SDK-3.7RC4-win32-x86_64\eclipse\plugins\com.ibm.icu.source_4.4.2.v20110208.jar

Bundle id is 6
 
The installation is successful even if locations strings are not equal but 

resolve to the same file.
Is that expected? 
 
Thanks, 
Katya_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev


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

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

Reply via email to