Hi Arnaud,

You can disable the auto-refresh (on kar or feature) to avoid this.

Can you do a feature:install -t -v to check the cause of the refresh (optional import I bet) ?

Regards
JB

On 10/19/2017 11:13 AM, Arnaud Geslin wrote:
Hello

We build kar files with Talend studio (some Camel routes) that are completly independent. When deploying thoses files by copy in container/deploy of by "bundle:install file://..." in the console, it sometimes refreshes all the other bundles already installed and active. ("stopping","resolved" then "active" again). This is a bit ennoying on a production system.

I've searched in the ML archive but did not find any discussion about precisely the same issue

The log says :

------------------------
/Changes to perform:
    Region: root
      Bundles to install:
        mvn:gfc.R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2
        mvn:org.apache.camel/camel-jetty-common/2.17.3
        mvn:org.apache.camel/camel-jetty9/2.17.3
        mvn:org.codehaus.woodstox/stax2-api/3.1.4
  Installing bundles:
    mvn:gfc.R_FRONTAL_HTTP/R_FRONTAL_HTTP/0.2
    mvn:org.apache.camel/camel-jetty-common/2.17.3
    mvn:org.apache.camel/camel-jetty9/2.17.3
    mvn:org.codehaus.woodstox/stax2-api/3.1.4
  Stopping bundles:
    gfc.R7_PU017B_BP_FROMKHEOPSTOSAP/0.1.0
    gfc.R_BROKER_KHEOPS/0.1.0
     ...
  Refreshing bundles:
     activemq-karaf/5.14.1 (*Wired to org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed)*      gfc.R7_PU017B_BP_FROMKHEOPSTOSAP/0.1.0 (*Wired to org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed*)      gfc.R_BROKER_BUS/0.1.0 (Wired to org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed)      gfc.R_BROKER_KHEOPS/0.1.0 (Wired to org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed)/
---------------

That's right all thoses bundles use activemq, but this feature is already installed and I don't understand why it should be refreshed when installing a new bundle, and then all the bundles wired to it.
Same issue for bundles that use Apache cxf.

I tried this workaround :
/[root@kardev01 container]# cat etc/org.apache.karaf.features.cfg
...
featuresBoot=\
     (instance, \
     activemq-client, \
     activemq-camel, \
     activemq, \
     package, \/

and also added in startup.properties :
/mvn\:joda-time/joda-time/2.9.2 = 50/

but it had no effect.

I also tried an other workaround, unzipping the kar file, to remove in the feature-xx.xml file the dependencies to activemq (/<feature>activemq</feature>/ and /<feature>activemq-camel</feature>/) then zip again the kar, and deploy it again but the bundles are still refreshed.

I guess we don't really need to refresh the activemq or cxf features, how could we avoid this ?

Thank you
Loko

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to