The bundle refresh are cascading, so in order to find the cause, you need to trace back the tree. In your example you have *activemq-karaf/5.14.1 (Wired to org.apache.activemq.activemq-osgi/5.14.1 which is being refreshed)* So you need to find why the *activemq-osgi* bundle is refreshed, and so on. Usually, you end up with an optional import which is not satisfied and that one of the newly installed bundle can satisfy, so in order to get that wired, the bundle needs to be refreshed.
The deploy folder does not allow tight control over the deployment, but if you use the command line, you'll be able to avoid the refresh as Jean-Baptiste hinted. 2017-10-19 11:13 GMT+02:00 Arnaud Geslin <[email protected]>: > 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 > -- ------------------------ Guillaume Nodet
