karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Ward <tim.w...@paremus.com>
Subject Re: OSGi Transaction control fails with hibernate
Date Wed, 13 Sep 2017 08:27:31 GMT
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 a member of the Aries user mailing list then that would be a better place to continue
this discussion.

Regards,

Tim

> On 13 Sep 2017, at 09:21, Guillaume Nodet <gnodet@apache.org> wrote:
> 
> 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 tx-control instead of wrapping the tm again and not being
flexible.
> Right now, tx-control uses its own instance of transaction manager and there's no way
around afaik, so you can't use the karaf transaction feature if you want to use it.
> Anyway, I'd gladly support you if you go to the aries mailing list to raise this point
!
> 
> 2017-09-13 9:52 GMT+02:00 <alexander.sahler@brodos.de <mailto:alexander.sahler@brodos.de>>:
> 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 TransactionManager (aries in my case for karaf 4.0.9). When hibernate EntityManager
implementation tries to join the transaction it fails because it uses the TransactionManager
provided by OsgiJtaPlatform (from hibernate-osgi) which is of course the one registered in
osgi ecosystem.
> 
> I think that the tx-control implementation has to use the TransactionManager registered
with OSGi.
> 
> Has anyone got that thing ever running?
> 
> Best Alexander.
> 
> 
> 
> -- 
> ------------------------
> Guillaume Nodet
> 


Mime
View raw message