New prefs.

Don't think about the symbolic name when dealing with Prefs. Prefs 
predates symbolic name. All Prefs can know is bundle id and bundle 
location. The Prefs spec is mute on which is the primary key for the prefs 
data. However the ref impl uses bundle id. I have opened an issue for CPEG 
to decide which it should be and will we then update the spec text and 
perhaps issue an erratum. I expect bundle id will be the choice since that 
is the behavior of the ref impl.

So in your scenario A and B and C all have different bundle ids. Therefore 
none of them can see any of the others preferences.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]
Office: +1 407 849 9117 Mobile: +1 386 848 3788



Roy Paterson/Austin/[EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
2006-01-31 03:57 PM
Please respond to
OSGi Developer Mail List <osgi-dev@bundles.osgi.org>


To
OSGi Developer Mail List <osgi-dev@bundles.osgi.org>
cc

Subject
Re: [osgi-dev] org.osgi.service.prefs bundle versions?







Ok, so what should happen in the following scenario: 

Bundles A and B are installed at the same time.  They have the same 
symbolic-name but different versions.  They both use prefs, so they have 
their own preferences. 

The Preferences Impl bundle is shutdown... 

... sometime later the Preferences Impl bundle starts up again.  Bundles A 
and B are no longer installed.  However there is a new Bundle C that has 
the same symbolic-name as A & B.  When Bundle C asks for it's prefs, what 
should it get?  A's prefs, B's prefs, or new prefs? 

Thanks, 
Roy

-----------------------------------------
Roy Paterson
IBM Pervasive Computing
Austin, TX
Phone: (512) 838-8898



BJ Hargrave/Austin/[EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED] 
01/26/2006 08:19 PM 

Please respond to
OSGi Developer Mail List <osgi-dev@bundles.osgi.org>


To
OSGi Developer Mail List <osgi-dev@bundles.osgi.org> 
cc

Subject
Re: [osgi-dev] org.osgi.service.prefs bundle versions?








[EMAIL PROTECTED] wrote on 2006-01-26 04:57:59 PM:

> 
> How should an implementation of the OSGi preferences service handle 
> bundles with the same symbolic name but different versions both 
> running on the same system?  Should the bundles share the same 
> preferences or should they each have their own? 

Technically, these are 2 distinct bundles. Each has a distinct bundle id 
and bundle location. Therefore, Prefs must treat each as a seperate bundle 

and give them each their own preferences.

If the there was only one bundles installed and it was updated to a new 
bundle version, then the updated bundle would then use the prefs from the 
original bundle. This is because they are the "same" bundle to Prefs: they 

have the same bundle id and bundle location.


> 
> This question came up in Eclipse bug https://bugs.eclipse.
> org/bugs/show_bug.cgi?id=124176#c5 
> 
> Regards, 
> Roy Paterson 
> 
> -----------------------------------------
> Roy Paterson
> IBM Pervasive Computing
> Austin, TX
> Phone: (512) 838-8898_______________________________________________
> osgi-dev mailing list
> osgi-dev@bundles.osgi.org
> http://bundles.osgi.org/mailman/listinfo/osgi-dev


BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]
Office: +1 407 849 9117 Mobile: +1 386 848 3788


_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev


_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev

Reply via email to