Hi Serge (sorry, I forgot to mention you in my last mail), hi Nick,

Thanks for the tips Nick, I did not thought about putting breakpoints into
Felix to see which bundle refresh what, will try it for sure.

Tim, I personally see the proxy issue with @Transactional as only a
technical/implementation issue: as a user, I really can't see the point
that using:

[code]

private int txGet() {

txControl.required(() -> {

return 42;

}

}
[/code]

is more modularity-friendly than

[code]
@Transactional (propagation=REQUIRED)
private int txGet() {
return 42;
}
[/code]

Finally, I want to personally thank you for your book that has a place of
choice in my library and brought me an unconditional love and interest for
the OSGI technology!



Best regards to all :),



2017-01-31 15:35 GMT+01:00 Timothy Ward <tim.w...@paremus.com>:

> Hi,
>
> Just to confirm, Tx Control doesn’t do @Transactional, but it does do JPA
> without the JPATemplate (i.e. you can just do normal JPA access within a
> managed block). As for bringing in Java EE guys, that’s great, but at least
> some of their usage patterns have to change if you want hot-swap and start
> up order independence to work!
>
> Regards,
>
> Tim Ward
>
> Enterprise OSGi in Action (http://www.manning.com/cummins)
> Apache Aries PMC
>
>
> On 31 Jan 2017, at 10:53, Charlie Mordant <cmorda...@gmail.com> wrote:
>
> Hi Timothy,
>
> Thank you for all your questions and interest.
>
> Concerning graphql, why not. I had in mind to provide a way to easily
> bring HATEOAS (via spring-hateoas, or implementing some cxf interceptors),
> but Graphql looks also promising, so why not, it'll be discussed...
>
> About the Aries Tx Control, it is a deliberate choice to not use it (sorry
> :-S): the goal of Osgiliath is mainly to bring JavaEE guys into the OSGi
> world without disturbing (most of) their habits, giving them modularity,
> scalability and hot swap for free.
> So in an ideal world, every service injection would be done with CDI
> annotations (that's why we're using pax-cdi), persistence with JPA
> annotations (without blueprint neither JPA template), transaction with
> @Transactional ones (without blueprint too), and if we could have web
> sessions/security context distributed accross bundles <3.
>
> Of course, life is made of tradeof, so if DS, Tx Control and JpaTemplate
> are the only way to go the right way, Osgiliath will too.
>
> Best regards,
>
> 2017-01-31 10:50 GMT+01:00 Timothy Ward <tim.w...@paremus.com>:
>
>> Hi Charlie,
>>
>> One other question, have you tried using Aries Transaction Control? The
>> big drivers for creating the Transaction Control Service were to simplify
>> the service model and to handle dynamics better when performing
>> transactional access to resources. The Aries implementation supports XA and
>> is fully recoverable, so it should be very simple to use in your project.
>>
>> Regards,
>>
>> Tim
>>
>> On 31 Jan 2017, at 09:48, Charlie Mordant <cmorda...@gmail.com> wrote:
>>
>> 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é <j...@nanthrax.net>:
>>
>>> 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.op
>>>> s4j.pax.jdbc_pax-jdbc-pool-common.version}</bundle>
>>>>         <bundle>mvn:org.ops4j.pax.jdbc/pax-jdbc-pool-aries/${org.ops
>>>> 4j.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-blueprint.
>>>> 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.transaction.blueprint/${org.apac
>>>> he.aries.transaction_org.apache.aries.transaction.blueprint.
>>>> version1}</bundle>
>>>>             <bundle>mvn:org.apache.aries.transaction/
>>>> org.apache.aries.transaction.blueprint/${org.apac
>>>> he.aries.transaction_org.apache.aries.transaction.blueprint.
>>>> version}</bundle>
>>>>             <bundle dependency="true">mvn:org.apac
>>>> he.xbean/xbean-blueprint/${org.apache.xbean_xbean-blueprint.
>>>> 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_feature.version}">
>>>>         <bundle dependency="true">mvn:javax.in
>>>> terceptor/javax.interceptor-api/${javax.interceptor_javax.in
>>>> terceptor-api.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.geronimo.specs/geronimo-atinject_1.0_spec/${org.apache.ge
>>>> ronimo.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.vers
>>>> ion}</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.ve
>>>> rsion}</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.j
>>>> pa/org.apache.aries.jpa.blueprint/${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.ve
>>>> rsion}</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_common
>>>> s-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.b
>>>> undles.commons-dbcp.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.servicemix.bundles/org.apache.servicemix.bundles.ant/${or
>>>> g.apache.servicemix.bundles_org.apache.servicemix.bundles.an
>>>> t.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.servicemix.bundles/org.apache.servicemix.bundles.serp/${o
>>>> rg.apache.servicemix.bundles_org.apache.servicemix.bundles.s
>>>> erp.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.geronimo.specs/geronimo-jms_1.1_spec/${org.apache.geronim
>>>> o.specs_geronimo-jms_1.1_spec.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.xbean/xbean-asm5-shaded/${org.apache.xbean_xbean-asm5-sha
>>>> ded.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.apac
>>>> he.geronimo.specs/geronimo-j2ee-connector_1.6_spec/${org.apa
>>>> che.geronimo.specs_geronimo-j2ee-connector_1.6_spec.version}</bundle>
>>>>         <bundle dependency="true">mvn:javax.va
>>>> lidation/validation-api/${javax.validation_validation-api.ve
>>>> rsion}</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.vers
>>>> ion}</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.ve
>>>> rsion}</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.j
>>>> pa/org.apache.aries.jpa.blueprint/${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.ve
>>>> rsion}</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_common
>>>> s-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.b
>>>> undles.commons-dbcp.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.servicemix.bundles/org.apache.servicemix.bundles.ant/${or
>>>> g.apache.servicemix.bundles_org.apache.servicemix.bundles.an
>>>> t.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.servicemix.bundles/org.apache.servicemix.bundles.serp/${o
>>>> rg.apache.servicemix.bundles_org.apache.servicemix.bundles.s
>>>> erp.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.geronimo.specs/geronimo-jms_1.1_spec/${org.apache.geronim
>>>> o.specs_geronimo-jms_1.1_spec.version}</bundle>
>>>>         <bundle dependency="true">mvn:org.apac
>>>> he.xbean/xbean-asm5-shaded/${org.apache.xbean_xbean-asm5-sha
>>>> ded.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.ve
>>>> rsion}</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-mana
>>>> gement</condition>
>>>>                         <bundle start-level="35"
>>>> dependency="true">mvn:io.swagger/swagger-annotations/${io.sw
>>>> agger_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é
>>> jbono...@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>>
>> --
>> Charlie Mordant
>>
>> Full OSGI/EE stack made with Karaf: https://github.com/OsgiliathEn
>> terprise/net.osgiliath.parent
>>
>>
>>
>
>
> --
> Charlie Mordant
>
> Full OSGI/EE stack made with Karaf: https://github.com/
> OsgiliathEnterprise/net.osgiliath.parent
>
>
>


-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Reply via email to