Hi Hari,
feature:repo-refresh will reload the features XML if it has changed.
However, the feature might be updated even if the features XML didn't
change (for instance if you use SNAPSHOT in the feature).
So, basically, we don't have an event today providing the "diff" between
an installed feature and the resolved feature.
feature:install -u with -t -v is possible and should provide the details
that you can parse.
Do you want to do it programmatically or by "scripting" ?
For the second point, you can call the feature service to get details,
providing the same as in the feature:install command (which actually use
the feature service).
Regards
JB
On 11/22/2016 12:32 PM, Hari Madhavan wrote:
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
o Check if there is an update available for a feature
o 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*
--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com