Hi J.B., Sure, it's always reproducible, I'll send it tonight (or tomorrow if I haven't the time to do it). I'm not in front of my computer for now, but will do my best as reactive as possible.
Best Regards, 2017-01-31 10:41 GMT+01:00 Jean-Baptiste Onofré <[email protected]>: > Hi Charlie, > > do you have the feature:install -v output ? It would help us to see the > cause of the refresh (optional import, or other). > > Thanks ! > > Regards > JB > > > On 01/31/2017 10:39 AM, Charlie Mordant wrote: > >> Hi users of the world's best application server ever ;-), >> >> I'm struggling with feature resolution, and would like to have your POV. >> >> This issue is concerning, the JDBC, the Blueprint and the transactional >> feature. >> >> Here's the issue with feature resolution in my pax-exam test: >> >> >> * The jdbc-pool-aries feature starts first (+ the config one and the cfg >> \o/). >> * Then the transactional feature >> * The third feature thats start is the aries jndi one, so the two >> datasources (the XA and non-XA ones) are exposed (\o/\o/). >> * But the third that starts is the blueprint one, which starts the >> xbean-blueprint bundle. >> That blueprint bundle restarts the 'optional' resolutions of aries >> transaction manager, which then restarts aries-jdbc modules (optional >> res again) & config, which stops the datasource and starts another one. >> Unfortunately, at this point, my 'daos' bundle is already linked with a >> proxy to the 'old' datasource. >> >> A way to fix it is to reference the 'transaction' feature in the >> 'pool-aries' one, and the 'blueprint' one in the 'transaction' one, but >> it would then break some modularity. >> >> Have you got an idea on how to properly handle it? >> >> The actual xml of my features, they're slightly similar to the karaf >> ones, with bundle versions aligned: >> [code] >> >> <feature name="osgiliath-pax-jdbc-pool-aries" description="Provides >> JDBC Pooling DataSourceFactory using Aries Transaction JDBC" >> version="${org.ops4j.pax.jdbc_pax-jdbc-features.version}" >> resolver="(obr)"> >> <feature>osgiliath-pax-jdbc-spec</feature> >> <bundle>mvn:org.ops4j.pax.jdbc/pax-jdbc-pool-common/${org. >> ops4j.pax.jdbc_pax-jdbc-pool-common.version}</bundle> >> <bundle>mvn:org.ops4j.pax.jdbc/pax-jdbc-pool-aries/${org. >> ops4j.pax.jdbc_pax-jdbc-pool-aries.version}</bundle> >> <conditional> >> <condition>osgiliath-aries-blueprint</condition> >> <bundle dependency="true">mvn:org.apac >> he.xbean/xbean-blueprint/${org.apache.xbean_xbean-bluepri >> nt.version}</bundle> >> </conditional> >> <conditional> >> <condition>osgiliath-transaction</condition> >> <bundle dependency="true">mvn:org.apac >> he.aries.transaction/org.apache.aries.transaction.jdbc/${ >> org.apache.aries.transaction_org.apache.aries.transaction. >> jdbc.version}</bundle> >> </conditional> >> </feature> >> >> >> <feature name="osgiliath-transaction" description="OSGi Transaction >> Manager" version="${org.apache.aries.transaction_org.apache.aries.tra >> nsaction.manager.version}"> >> <config name="org.apache.aries.transaction" append="false"> >> aries.transaction.recoverable = true >> aries.transaction.timeout = 600 >> aries.transaction.howl.logFileDir = ${karaf.data}/txlog >> aries.transaction.howl.maxLogFiles = 2 >> aries.transaction.howl.maxBlocksPerFile = 512 >> aries.transaction.howl.bufferSize = 4 >> </config> >> <feature version="${transaction-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-t >> ransaction-api</feature> >> <bundle dependency="true">mvn:org.apac >> he.aries/org.apache.aries.util/${org.apache.aries_org.apache >> .aries.util.version}</bundle> >> <bundle>mvn:org.apache.aries.transaction/org.apache.aries.tr >> ansaction.manager/${org.apache.aries.transaction_org.apache. >> aries.transaction.manager.version}</bundle> >> <conditional> >> <condition>osgiliath-aries-blueprint</condition> >> <bundle dependency="true">mvn:org.apac >> he.felix/org.apache.felix.coordinator/${org.apache.felix_ >> org.apache.felix.coordinator.version}</bundle> >> <bundle>mvn:org.apache.aries.transaction/org.apache.aries.tr >> ansaction.blueprint/${org.apache.aries.transaction_org.apach >> e.aries.transaction.blueprint.version1}</bundle> >> <bundle>mvn:org.apache.aries.transaction/org.apache.aries.tr >> ansaction.blueprint/${org.apache.aries.transaction_org.apach >> e.aries.transaction.blueprint.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.xbean/xbean-blueprint/${org.apache.xbean_xbean-bluepri >> nt.version}</bundle> >> </conditional> >> <conditional> >> <condition>osgiliath-spring</condition> >> <feature >> version="${org.apache.servicemix.bundles.spring.version}" >> dependency="true">osgiliath-spring-tx</feature> >> </conditional> >> </feature> >> >> ********************************************************* Additional >> informations ****************************************** >> >> >> <feature name="osgiliath-transaction-api" version="${transaction-api_fea >> ture.version}"> >> <bundle dependency="true">mvn:javax.in >> terceptor/javax.interceptor-api/${javax.interceptor_javax.in >> terceptor-api.version}</bundle> >> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo- >> atinject_1.0_spec/${org.apache.geronimo.specs_geronimo >> -atinject_1.0_spec.version}</bundle> >> <bundle dependency="true">mvn:javax.el >> /javax.el-api/${javax.el_javax.el-api.version}</bundle> >> <bundle dependency="true">mvn:javax.en >> terprise/cdi-api/${javax.enterprise_cdi-api.version}</bundle> >> <bundle>mvn:javax.transaction/javax.transaction-api/${javax. >> transaction_javax.transaction-api.version}</bundle> >> </feature> >> <feature name="osgiliath-persistence-api" description="Persistence API" >> version="${persistence-api_feature.version}"> >> <bundle>mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/ >> ${org.apache.geronimo.specs_geronimo-jpa_2.0_spec.version}</bundle> >> <bundle>mvn:org.apache.geronimo.specs/geronimo-osgi-registry >> /${org.apache.geronimo.specs_geronimo-osgi-registry.version}</bundle> >> </feature> >> <feature name="osgiliath-jpa" description="OSGi Persistence Container" >> version="${org.apache.aries.jpa.version}"> >> <feature version="${transaction-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-t >> ransaction-api</feature> >> <feature version="${persistence-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-p >> ersistence-api</feature> >> <bundle dependency="true">mvn:org.apac >> he.felix/org.apache.felix.coordinator/${org.apache.felix_ >> org.apache.felix.coordinator.version}</bundle> >> <bundle dependency="true">mvn:org.osgi >> /org.osgi.service.jdbc/${org.osgi_org.osgi.service.jdbc.version}</bundle> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/${ >> org.apache.aries.jpa_org.apache.aries.jpa.api.version}</bundle> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.contai >> ner/${org.apache.aries.jpa_org.apache.aries.jpa.container >> .version}</bundle> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.suppor >> t/${org.apache.aries.jpa_org.apache.aries.jpa.support.version}</bundle> >> <conditional> >> <condition>osgiliath-aries-blueprint</condition> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.bluepr >> int/${org.apache.aries.jpa_org.apache.aries.jpa.blueprint >> .version}</bundle> >> </conditional> >> </feature> >> >> <feature name="osgiliath-openjpa" description="Apache OpenJPA 2.4.x >> persistence engine support" version="${org.apache.openjpa.version}"> >> <feature prerequisite="false" dependency="false">osgiliath-j >> ndi</feature> >> <feature version="${transaction-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-t >> ransaction-api</feature> >> <feature version="${persistence-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-p >> ersistence-api</feature> >> <bundle dependency="true">mvn:javax.se >> rvlet/javax.servlet-api/${javax.servlet_javax.servlet-api. >> version}</bundle> >> <bundle dependency="true">mvn:javax.el >> /javax.el-api/${javax.el_javax.el-api.version}</bundle> >> <bundle dependency="true">mvn:commons- >> lang/commons-lang/${commons-lang_commons-lang.version}</bundle> >> <bundle dependency="true">mvn:commons- >> collections/commons-collections/${commons-collections_ >> commons-collections.version}</bundle> >> <bundle dependency="true">mvn:commons- >> pool/commons-pool/${commons-pool_commons-pool.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.servicemix.bundles/org.apache.servicemix.bundles.commons- >> dbcp/${org.apache.servicemix.bundles_org.apache.servicemix. >> bundles.commons-dbcp.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.servicemix.bundles/org.apache.servicemix.bundles.ant/${ >> org.apache.servicemix.bundles_org.apache.servicemix.bundles. >> ant.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.servicemix.bundles/org.apache.servicemix.bundles.serp/${ >> org.apache.servicemix.bundles_org.apache.servicemix.bundles. >> serp.version}</bundle> >> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo- >> jms_1.1_spec/${org.apache.geronimo.specs_geronimo-jms_1. >> 1_spec.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.xbean/xbean-asm5-shaded/${org.apache.xbean_xbean-asm5- >> shaded.version}</bundle> >> <bundle>mvn:org.apache.openjpa/openjpa/${org.apache.openjpa_ >> openjpa.version}</bundle> >> </feature> >> <feature name="osgiliath-connector" version="${org.apache.geronimo >> .components_geronimo-connector.version}" description="OSGi Support for >> JCA Connector 1.6" resolver="(obr)"> >> <feature version="${org.apache.aries.tr >> ansaction_org.apache.aries.transaction.manager.version}">osg >> iliath-transaction</feature> >> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo- >> j2ee-connector_1.6_spec/${org.apache.geronimo.specs_ >> geronimo-j2ee-connector_1.6_spec.version}</bundle> >> <bundle dependency="true">mvn:javax.va >> lidation/validation-api/${javax.validation_validation-api. >> version}</bundle> >> <bundle>mvn:org.apache.geronimo.components/geronimo-connecto >> r/${org.apache.geronimo.components_geronimo-connector.version}</bundle> >> </feature> >> <feature name="osgiliath-jpa" description="OSGi Persistence Container" >> version="${org.apache.aries.jpa.version}"> >> <feature version="${transaction-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-t >> ransaction-api</feature> >> <feature version="${persistence-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-p >> ersistence-api</feature> >> <bundle dependency="true">mvn:org.apac >> he.felix/org.apache.felix.coordinator/${org.apache.felix_ >> org.apache.felix.coordinator.version}</bundle> >> <bundle dependency="true">mvn:org.osgi >> /org.osgi.service.jdbc/${org.osgi_org.osgi.service.jdbc.version}</bundle> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/${ >> org.apache.aries.jpa_org.apache.aries.jpa.api.version}</bundle> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.contai >> ner/${org.apache.aries.jpa_org.apache.aries.jpa.container >> .version}</bundle> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.suppor >> t/${org.apache.aries.jpa_org.apache.aries.jpa.support.version}</bundle> >> <conditional> >> <condition>osgiliath-aries-blueprint</condition> >> <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.bluepr >> int/${org.apache.aries.jpa_org.apache.aries.jpa.blueprint >> .version}</bundle> >> </conditional> >> </feature> >> <feature name="osgiliath-openjpa" description="Apache OpenJPA 2.4.x >> persistence engine support" version="${org.apache.openjpa.version}"> >> <details>Enable Apache OpenJPA as persistence engine.</details> >> <feature prerequisite="false" dependency="false">osgiliath-j >> ndi</feature> >> <feature version="${transaction-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-t >> ransaction-api</feature> >> <feature version="${persistence-api_feature.version}" >> prerequisite="false" dependency="false">osgiliath-p >> ersistence-api</feature> >> <bundle dependency="true">mvn:javax.se >> rvlet/javax.servlet-api/${javax.servlet_javax.servlet-api. >> version}</bundle> >> <bundle dependency="true">mvn:javax.el >> /javax.el-api/${javax.el_javax.el-api.version}</bundle> >> <bundle dependency="true">mvn:commons- >> lang/commons-lang/${commons-lang_commons-lang.version}</bundle> >> <bundle dependency="true">mvn:commons- >> collections/commons-collections/${commons-collections_ >> commons-collections.version}</bundle> >> <bundle dependency="true">mvn:commons- >> pool/commons-pool/${commons-pool_commons-pool.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.servicemix.bundles/org.apache.servicemix.bundles.commons- >> dbcp/${org.apache.servicemix.bundles_org.apache.servicemix. >> bundles.commons-dbcp.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.servicemix.bundles/org.apache.servicemix.bundles.ant/${ >> org.apache.servicemix.bundles_org.apache.servicemix.bundles. >> ant.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.servicemix.bundles/org.apache.servicemix.bundles.serp/${ >> org.apache.servicemix.bundles_org.apache.servicemix.bundles. >> serp.version}</bundle> >> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo- >> jms_1.1_spec/${org.apache.geronimo.specs_geronimo-jms_1. >> 1_spec.version}</bundle> >> <bundle dependency="true">mvn:org.apac >> he.xbean/xbean-asm5-shaded/${org.apache.xbean_xbean-asm5- >> shaded.version}</bundle> >> <bundle>mvn:org.apache.openjpa/openjpa/${org.apache.openjpa_ >> openjpa.version}</bundle> >> </feature> >> >> >> >> <feature name='osgiliath-persistence' version='${project.version}' >> resolver="(obr)" start-level="41" description="Java persistence API stack" > >> <bundle dependency='true'>mvn:javax.se >> rvlet/javax.servlet-api/${javax.servlet_javax.servlet-api. >> version}</bundle> >> <feature version="${project.version}">o >> sgiliath-jdbc</feature> >> <feature version="${org.apache.geronimo >> .components_geronimo-connector.version}">osgiliath-connector</feature> >> <feature version="${org.apache.aries.jp >> a.version}">osgiliath-jpa</feature> >> <bundle dependency='true'>mvn:org.osgi >> /org.osgi.service.jpa/${org.osgi_org.osgi.service.jpa.version}</bundle> >> <feature version="${org.apache.openjpa. >> version}">osgiliath-openjpa</feature> >> <feature version="${org.apache.karaf.fe >> atures_standard.version}">osgiliath-aries-blueprint</feature> >> <bundle>mvn:org.apache.xbean/x >> bean-reflect/${org.apache.xbean_xbean-reflect.version}</bundle> >> <feature version="${project.version}">o >> sgiliath-spring-data-jpa</feature> >> <conditional> >> <condition>osgiliath-rest-management</condition> >> <bundle start-level="35" >> dependency="true">mvn:io.swagger/swagger-annotations/${io. >> swagger_swagger-annotations.version}</bundle> >> </conditional> >> </feature> >> >> [/code] >> >> >> Best regards, and keep up bringing the OSGI dream comes true ;-) >> >> >> -- >> Charlie Mordant >> >> Full OSGI/EE stack made with Karaf: >> https://github.com/OsgiliathEnterprise/net.osgiliath.parent >> > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com > -- Charlie Mordant Full OSGI/EE stack made with Karaf: https://github.com/OsgiliathEnterprise/net.osgiliath.parent
