Pascal Rapicault | 4 Jun 2006 11:09
Picon

Re: Location of Persistent UserAdmin Data


Eclipse update is not in a position of deciding with full satisfaction of the user whether things should be "updated", "installed", "uninstalled then installed". For example, if one had junit 3.8 and wanted to install junit 4.0... what should happen? For that it needs to

If OSGi was not alwasys tightening up its lose ends with the magic "management agent" :-)

PaScaL



Thomas Watson <tjwatson-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

06/01/2006 02:28 PM

Please respond to
Equinox development mailing list

To
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>
cc
Subject
Re: [equinox-dev] Location of Persistent UserAdmin Data






See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=73013 against Eclipse->Platform->Update.

If eclipse update would use the proper Bundle.update method instead of uninstalling/installing each time a new version of a bundle bacame available then these types of issues would be solved.

Tom



Roy Paterson/Austin/IBM <at> IBMUS
Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

06/01/2006 01:04 PM

Please respond to
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>

To
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>
cc
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>, equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
Subject
Re: [equinox-dev] Location of Persistent UserAdmin Data







BJ's answer is correct from an OSGi spec standpoint, but there are Eclipse
considerations which are relavant to Benjamin's questions.  See
http://bugs.eclipse.org/bugs/show_bug.cgi?id=124176#c10.

In summary bundle ids do not change between framework launches, but if you
update a bundle using Eclipse update it actually uninstalls the old version
and installs the new version, resulting in a new bundle id.  This was an
issue with the OSGi Prefs implementation.  In the end we just documented it
as a known limitation.

Regards,
Roy

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



                                                                         
           BJ                                                            
           Hargrave/Austin/I                                            
           BM <at> IBMUS                                                   To
           Sent by:                  Equinox development mailing list    
           equinox-dev-bounc         <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>          
           es-j9T/66MeVpFAfugRpC6u6w@public.gmane.org                                             cc
                                                                         
                                                                 Subject
           06/01/2006 12:20          Re: [equinox-dev] Location of      
           PM                        Persistent UserAdmin Data          
                                                                         
                                                                         
           Please respond to                                            
                Equinox                                                  
              development                                                
             mailing list                                                
           <equinox-dev <at> ecli                                            
               pse.org>                                                  
                                                                         
                                                                         




Bundle ids cannot change between framework launches. The bundle id is the
primary key of the bundle and may not change or ever be reused within a
framework instance.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
Office: +1 407 849 9117 Mobile: +1 386 848 3788



"Benjamin Schmaus" <benjamin.schmaus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
2006-06-01 12:46 PM
Please respond to
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>


To
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
cc

Subject
[equinox-dev] Location of Persistent UserAdmin Data






Equinox Developers,

I've been developing a user/group admin bundle that runs on top of the
Equinox OSGi UserAdmin service  implementation, and I've noticed that data
is persisted to a file that is named like so:

"org.eclipse.core.runtime.preferences.OSGiPreferences." +
bundle.getBundleId()

So the actual file name might end up being something like:
"org.eclipse.core.runtime.preferences.OSGiPreferences.27.prefs"

Since a bundle's id can change between framework starts and stops, users
and roles created by a given bundle during one execution of the framework
won't necessarily be available to that bundle in another execution of the
framework ( i.e. since bundle id can vary across runs).

Should a bundle have to re-create user and role assignments on every start
of the framework if persistent data can't be located?  That doesn't seem
right to me.

It could be that user admin data can be persisted to a static (known
before runtime) location via the Equinox UserAdmin impl, but it's not
clear to me how this should be done.

- Ben Schmaus_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<div>
<br>Eclipse update is not in a position
of deciding with full satisfaction of the user whether things should be
"updated", "installed", "uninstalled then installed".
For example, if one had junit 3.8 and wanted to install junit 4.0... what
should happen? For that it needs to 
<br><br>If OSGi was not alwasys tightening up
its lose ends with the magic "management agent" :-)
<br><br>PaScaL
<br><br><br><br><table width="100%"><tr valign="top">
<td width="40%">Thomas Watson &lt;tjwatson@...&gt;

<br>Sent by: equinox-dev-bounces@...
<p>06/01/2006 02:28 PM
</p>
<table border><tr valign="top"><td bgcolor="white">
<div align="center">Please respond to<br>
Equinox development mailing list</div>
</td></tr></table>
<br>
</td>
<td width="59%">
<table width="100%">
<tr>
<td>
<div align="right">To</div>
</td>
<td valign="top">Equinox development mailing
list &lt;equinox-dev@...&gt;
</td>
</tr>
<tr>
<td>
<div align="right">cc</div>
</td>
<td valign="top">
</td>
</tr>
<tr>
<td>
<div align="right">Subject</div>
</td>
<td valign="top">Re: [equinox-dev] Location
of Persistent UserAdmin Data</td>
</tr>
</table>
<br><table><tr valign="top">
<td>
</td>
<td></td>
</tr></table>
<br>
</td>
</tr></table>
<br><br><br><br>
See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=73013 against Eclipse-&gt;Platform-&gt;Update.
<br><br>
If eclipse update would use the proper Bundle.update method instead of
uninstalling/installing each time a new version of a bundle bacame available
then these types of issues would be solved. <br><br>
Tom <br><br><br><br>
<table width="100%"><tr valign="top">
<td width="37%">Roy Paterson/Austin/IBM <at> IBMUS
<br>
Sent by: equinox-dev-bounces@... 
<p>06/01/2006 01:04 PM

<br></p>
<table border="4" width="100%"><tr valign="top"><td width="100%" bgcolor="white">
<div align="center">Please respond to<br>
Equinox development mailing list &lt;equinox-dev@...&gt;</div>
</td></tr></table>
<p>
</p>
</td>
<td width="62%">
<table width="100%">
<tr valign="top">
<td width="13%">
<div align="right">To</div>
</td>
<td width="86%">Equinox development mailing
list &lt;equinox-dev@...&gt; 
</td>
</tr>
<tr valign="top">
<td>
<div align="right">cc</div>
</td>
<td>Equinox development mailing list &lt;equinox-dev@...&gt;,
equinox-dev-bounces@... 
</td>
</tr>
<tr valign="top">
<td>
<div align="right">Subject</div>
</td>
<td>Re: [equinox-dev] Location of Persistent
UserAdmin Data</td>
</tr>
</table>
<br><br><table width="100%"><tr valign="top">
<td width="50%">
</td>
<td width="50%"></td>
</tr></table>
<br>
</td>
</tr></table>
<br><br><br><br>
BJ's answer is correct from an OSGi spec standpoint, but there are Eclipse<br>
considerations which are relavant to Benjamin's questions. &nbsp;See<br>
http://bugs.eclipse.org/bugs/show_bug.cgi?id=124176#c10.<br><br>
In summary bundle ids do not change between framework launches, but if
you<br>
update a bundle using Eclipse update it actually uninstalls the old version<br>
and installs the new version, resulting in a new bundle id. &nbsp;This
was an<br>
issue with the OSGi Prefs implementation. &nbsp;In the end we just documented
it<br>
as a known limitation.<br><br>
Regards,<br>
Roy<br><br>
-----------------------------------------<br>
Roy Paterson<br>
IBM Pervasive Computing<br>
Austin, TX<br>
Phone: (512) 838-8898<br><br><br><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BJ &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hargrave/Austin/I &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BM <at> IBMUS &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
To <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sent by: &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Equinox development mailing list
&nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;equinox-dev-bounc &nbsp; &nbsp;
&nbsp; &nbsp; &lt;equinox-dev@...&gt; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;es@... &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cc <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;Subject <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;06/01/2006 12:20 &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;Re: [equinox-dev] Location of &nbsp; &nbsp; &nbsp;
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PM &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Persistent UserAdmin
Data &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Please respond to &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Equinox &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; development &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mailing list &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;equinox-dev <at> ecli &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pse.org&gt; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br><br><br><br><br>
Bundle ids cannot change between framework launches. The bundle id is the<br>
primary key of the bundle and may not change or ever be reused within a<br>
framework instance.<br><br>
BJ Hargrave<br>
Senior Technical Staff Member, IBM<br>
OSGi Fellow and CTO of the OSGi Alliance<br>
hargrave@...<br>
Office: +1 407 849 9117 Mobile: +1 386 848 3788<br><br><br><br>
"Benjamin Schmaus" &lt;benjamin.schmaus@...&gt;<br>
Sent by: equinox-dev-bounces@...<br>
2006-06-01 12:46 PM<br>
Please respond to<br>
Equinox development mailing list &lt;equinox-dev@...&gt;<br><br><br>
To<br>
equinox-dev@...<br>
cc<br><br>
Subject<br>
[equinox-dev] Location of Persistent UserAdmin Data<br><br><br><br><br><br><br>
Equinox Developers,<br><br>
I've been developing a user/group admin bundle that runs on top of the<br>
Equinox OSGi UserAdmin service &nbsp;implementation, and I've noticed that
data<br>
is persisted to a file that is named like so:<br><br>
"org.eclipse.core.runtime.preferences.OSGiPreferences." +<br>
bundle.getBundleId()<br><br>
So the actual file name might end up being something like:<br>
"org.eclipse.core.runtime.preferences.OSGiPreferences.27.prefs"<br><br>
Since a bundle's id can change between framework starts and stops, users<br>
and roles created by a given bundle during one execution of the framework<br>
won't necessarily be available to that bundle in another execution of the<br>
framework ( i.e. since bundle id can vary across runs).<br><br>
Should a bundle have to re-create user and role assignments on every start<br>
of the framework if persistent data can't be located? &nbsp;That doesn't
seem<br>
right to me.<br><br>
It could be that user admin data can be persisted to a static (known<br>
before runtime) location via the Equinox UserAdmin impl, but it's not<br>
clear to me how this should be done.<br><br>
- Ben Schmaus_______________________________________________<br>
equinox-dev mailing list<br>
equinox-dev@...<br>
https://dev.eclipse.org/mailman/listinfo/equinox-dev<br><br><br>
_______________________________________________<br>
equinox-dev mailing list<br>
equinox-dev@...<br>
https://dev.eclipse.org/mailman/listinfo/equinox-dev<br><br><br>
_______________________________________________<br>
equinox-dev mailing list<br>
equinox-dev@...<br>
https://dev.eclipse.org/mailman/listinfo/equinox-dev<br>_______________________________________________<br>
equinox-dev mailing list<br>
equinox-dev@...<br>
https://dev.eclipse.org/mailman/listinfo/equinox-dev<br>
<br>
</div>

Gmane