Hi All,

We use OSGi with Karaf for a secure and reliable message delivery product
that is deployed on end-user desktops ( as opposed to servers ) . One of
the things that is important is to have seamless auto-upgrades of the
product as new versions are published. There are 2 requirements that we had
for which I wanted to understand the best solution.


   - We had decided to stop all activity in the product before starting the
   upgrade. This would cause a small delay for the end-user but as upgrades do
   not happen often it is acceptable as long as we do it only during upgrades.
   The process that we would follow is as follows
   - Check if there is an update available for a feature
      - If updates are available
         - complete currently running transactions
         - shutdown all services
         - pull down the updates from the server ( Nexus )
         - install the updates

How can we find whether there is an feature upgrade to be installed ? Is
there an event on feature:repo-refresh that we can bind to which will tell
us that the feature has an upgrade ? Alternatively can we invoke
feature:install when it runs with -t -v parameters through an API interface
as that would also enable us to confirm whether an attempt to upgrade would
bring new versions or not.


   - We wanted to have an option of running an upgrade installer at the
   time of upgrade where the structure of some of the persistent data stores (
   databases , preference files ) related to the product are updated to be
   consistent with the new version of the bundle that manages this data store.
   To do this we defined an upgrade interface that is implemented in bundles
   that need some client side changes to be done at the time of upgrade. We
   plan to invoke this service interface after the upgraded bundle has been
   installed by providing the earlier version of the bundle as a parameter,
    so that the upgrade service implementation within the bundle can serially
   do all upgrade changes from that version to the current version.  To do
   this before installing a feature , I'd like to know the original version of
   each bundle which has changed. This information is available when
   feature:install is run with a -v parameter. How can we programatically
   access that information ?

Apologies for the long mail and thanks in advance for your suggestions.

Regards
Hari


Regards
Hari

Hari Madhavan,
Director - ERP Practice,
Promantia Global Consulting LLP <http://www.promantia.in>
Ph: +91 9845147731
*Openbravo Gold Partner*

Reply via email to