Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Timothy Ward
Hi Alexander, That looks like it should be fine - what version of Aries JPA are you using? There were some fixes made to Aries JPA in 2.4.0 to add support for JPA 2.1 configuration properties which are needed by the transaction control implementation, and I think that there were then more

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread alexander.sahler
Thanks Tim for the update. I tried the approach with providing a factory config in karaf.dir/etc/org.apache.aries.tx.control.jpa.xa.cfg with config as: osgi.unit.name=DSContext2 osgi.jdbc.driver.class=org.h2.Driver url=jdbc:h2:mem:article user=sa password= whilst having a mininmal

Re: Upgrading karaf 4.0.5 to 4.0.9 "feature:stop" not working

2017-09-13 Thread Guillaume Nodet
THis is clearly a bug. Could you please raise a JIRA issue ? 2017-09-13 11:41 GMT+02:00 Saishrinivas Polishetti : > Hi > > Initially we were using karaf 4.0.5 now are planning to move to 4.0.9. > feature:stop used to make feature and its respective bundles in resolved

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Timothy Ward
Hi Alexander, So what you’re doing is passing a fully configured EntityManagerFactory to the resource provider factory. If you create the provider this way then you are responsible for setting up all of the EntityManagerFactory’s configuration, including how it’s going to integrate with

Antw: Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread alexander.sahler
Hi Tim, I use a JPAEntityManagerProviderFactory (providerFactory) which I inject as a service reference into my repository class. Furthermore, I inject a EntityManagerFactory (emf) into the repository class as well as the TransactionControl (txControl). The provider Factory is created by

Upgrading karaf 4.0.5 to 4.0.9 "feature:stop" not working

2017-09-13 Thread Saishrinivas Polishetti
Hi Initially we were using karaf 4.0.5 now are planning to move to 4.0.9. feature:stop used to make feature and its respective bundles in resolved state. feature:stop used to work in 4.0.5 but in 4.0.9 the feature getting resolved but the bundles are in active state. Is these is bug in 4.0.9 or

Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Timothy Ward
Hi Alexander, Do you have a code example of how you’re obtaining and using the EntityManager? There should be no usage of the OSGiJtaPlatform from the tx-control XA JPA resource provider, which means that there’s either a bug in the resource provider, or something is misconfigured. If you are

Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Guillaume Nodet
Fwiw, you should ask on the Aries mailing list, where tx-control is developed. I've recently worked on a new project called pax-transx which provides an abstraction layer on top of transaction managers so that some features can be accessed in a common way. I think this should be used in

OSGi Transaction control fails with hibernate

2017-09-13 Thread alexander.sahler
Hello. I'm trying to get tx-control with XA transactions running (local is working). I found that tx-control opens a JTA transaction using RecoveryWorkAroundTransactionManager (derived from geronimo's TransactionManager Implementation) explicitly instead of using the registered