You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by ellirael <el...@mail.ru> on 2015/03/24 09:33:30 UTC

Declarative JTA transactions XA aware resources auto-enlistment rules

I've tried and tested declarative transactions with JDBC DataSources using
pax-jdbc. Thanks to 
Christian Schneider.

I'v trying to understand the XA aware resources auto-enlistment. But I
cannot found any info. Lack of docs.
All bundle resources are enslisted?
All bundle resources that appears in blueprint config are enslisted?
All karaf platform XA aware resuorces are enlisted?




--
View this message in context: http://karaf.922171.n3.nabble.com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-rules-tp4039247.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Declarative JTA transactions XA aware resources auto-enlistment rules

Posted by ellirael <el...@mail.ru>.
Thanks.



--
View this message in context: http://karaf.922171.n3.nabble.com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-rules-tp4039247p4039262.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Declarative JTA transactions XA aware resources auto-enlistment rules

Posted by ellirael <el...@mail.ru>.
I tested JTA JPA earlier. It works.
I had problems when tried JTA JDBC. It works too, with pax-jdbc. Pax-jdbc
grants pooling and XA wrapping for DataSources.

When I saw your message, I wanted to try another solution of XA DataSource
auto wrapping. I've tried and it doesn't work. I think it is because of
wrappers bundle absence.

Looked through org.apache.aries.transaction.manager pom.xml. Could not find
wrapper dependency.
Wrappers depends on manager instead.

Is this your framework?
Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent



--
View this message in context: http://karaf.922171.n3.nabble.com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-rules-tp4039247p4039278.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Declarative JTA transactions XA aware resources auto-enlistment rules

Posted by Charlie Mordant <cm...@gmail.com>.
Hum,
I'm not really sure, I don't embed it in my framework, and tx seems to work
(JMS to JPA).
org.apache.aries.transaction.wrappers version is also inferior to
org.apache.aries.transaction.manager
<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.aries.transaction.manager%22>
one,
so I think that Aries developers integrated it in the main bundle (the
manager one).
Concerning how I found the doc, I tried to make XA tx working within an
OSGI project, so crawled the web...

You can take a look at my framework to see how I linked it, but as I said,
I think that it works.

Regards,

2015-03-24 16:05 GMT+01:00 ellirael <el...@mail.ru>:

> Great docs. How did you find it?
>
> Bundle org.apache.aries.transaction.wrappers doesn't included in Karaf
> 3.0.3.
> Should I install it manually?
> Maybe it is some feature that installs it?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-rules-tp4039247p4039263.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Charlie Mordant

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

Re: Declarative JTA transactions XA aware resources auto-enlistment rules

Posted by ellirael <el...@mail.ru>.
Great docs. How did you find it?

Bundle org.apache.aries.transaction.wrappers doesn't included in Karaf
3.0.3.
Should I install it manually?
Maybe it is some feature that installs it?



--
View this message in context: http://karaf.922171.n3.nabble.com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-rules-tp4039247p4039263.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Declarative JTA transactions XA aware resources auto-enlistment rules

Posted by Charlie Mordant <cm...@gmail.com>.
Hi,

This documentation?
https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html/EIP_Transactions_Guide/XaJdbc-AutoEnlist.html


Regards,

2015-03-24 9:47 GMT+01:00 Christian Schneider <ch...@die-schneider.net>:

> As far as I know the auto enlistment happens when a Connection is created.
> This Connection will then be enlisted a the TransactionManager as a
> resource.
> In Aries jpa this happens when the EntityManager is created which happens
> at first access to the injected EntityManager proxy.
>
> So in effect the resources are enlisted as you use them.
>
> Christian
>
>
> On 24.03.2015 09:33, ellirael wrote:
>
>> I've tried and tested declarative transactions with JDBC DataSources using
>> pax-jdbc. Thanks to
>> Christian Schneider.
>>
>> I'v trying to understand the XA aware resources auto-enlistment. But I
>> cannot found any info. Lack of docs.
>> All bundle resources are enslisted?
>> All bundle resources that appears in blueprint config are enslisted?
>> All karaf platform XA aware resuorces are enlisted?
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-
>> rules-tp4039247.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Charlie Mordant

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

Re: Declarative JTA transactions XA aware resources auto-enlistment rules

Posted by Christian Schneider <ch...@die-schneider.net>.
As far as I know the auto enlistment happens when a Connection is 
created. This Connection will then be enlisted a the TransactionManager 
as a resource.
In Aries jpa this happens when the EntityManager is created which 
happens at first access to the injected EntityManager proxy.

So in effect the resources are enlisted as you use them.

Christian

On 24.03.2015 09:33, ellirael wrote:
> I've tried and tested declarative transactions with JDBC DataSources using
> pax-jdbc. Thanks to
> Christian Schneider.
>
> I'v trying to understand the XA aware resources auto-enlistment. But I
> cannot found any info. Lack of docs.
> All bundle resources are enslisted?
> All bundle resources that appears in blueprint config are enslisted?
> All karaf platform XA aware resuorces are enlisted?
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Declarative-JTA-transactions-XA-aware-resources-auto-enlistment-rules-tp4039247.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com