Hi JB, The idea is to provide such this functionality without requiring the user to construct a feature.
In some scenarios, features are not really suitable. Think for example a system whose individual bundles are changed on a daily basis for maintenance reasons, or a very modularised platform where each individual bundle provides some business functionality and is self-contained, and there is no notion of "the application" as such. Deploying the app through features may not really bring much value in those scenarios, and in fact can cause more overhead than needed, because each upgrade adds the overhead of editing the features descriptor, refreshing it, etc. Moreover, I think we shouldn't force users to use features if they want start level stickiness... This shouldn't be very difficult to implement and it could be extremely useful ;) Regards, Raúl. On 16 December 2011 13:16, Jean-Baptiste Onofré <[email protected]> wrote: > Hi Raul, > > why don't you use a feature, in the feature you set the start-level of > your bundles ? > > Regards > JB > > > On 12/16/2011 02:10 PM, Raul Kripalani wrote: > >> Hi, >> >> In many occasions you will have set custom start levels for your >> organisation's bundles to better honour the internal dependencies between >> them. >> >> The bundle's start level will be preserved across bundle updates, but as >> your system evolves, the version numbers of your bundles will increment >> and >> "osgi:update" won't not applicable anymore to update to the next version. >> You will need to perform osgi:install and osgi:uninstall. >> >> I think having a mechanism to "pin" a specific start level to bundles such >> that it is preserved across version updates would be great. >> >> Two ways of achieving this sticky start level behaviour spring to mind: >> >> 1. Create a custom manifest header to set the level, such as... >> Karaf-Bundle-Start-Level: 70. The down side is that portability decreases >> and not only between OSGi implementations, but also between deployment >> scenarios. After all, organisation A won't be using the same start level >> policy/scale as organisation B. >> >> 2. Create a management agent that listens to bundle installation events >> and >> leverages the Start Level OSGi service, along with a configuration file >> that maps Bundle Symbolic Names to start levels, to set the remembered >> start level back on the bundle. The config file would have the format: >> bundleSymbolicName=startLevel. Check out: >> http://www.osgi.org/javadoc/**r4v43/org/osgi/framework/** >> startlevel/BundleStartLevel.**html(post<http://www.osgi.org/javadoc/r4v43/org/osgi/framework/startlevel/BundleStartLevel.html(post> >> OSGi 4.3), >> http://www.osgi.org/javadoc/**r4v43/org/osgi/service/** >> startlevel/StartLevel.html(pre<http://www.osgi.org/javadoc/r4v43/org/osgi/service/startlevel/StartLevel.html(pre> >> OSGi 4.3). >> >> What do you think? >> >> Regards, >> >> *Raúl Kripalani* >> FuseSource Corp. >> fusesource.com<http://www.**fusesource.com/ <http://www.fusesource.com/>> >> | twitter: @raulvk, @fusenews >> >> > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com >
