karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Karaf JTA and JDBC DataSource
Date Mon, 16 Mar 2015 15:04:34 GMT
Aries JPA will wrap an XADataSource into an XA aware DataSource. It will 
not add pooling though. If you XADataSource already supports pooling 
then this might be good enough. If not then pax-jdbc-pool-dbcp2 will do 
both pooling + XA aware. So pax-jdbc is the more general solution.

You should be able to use declarative transactions with jdbc. The 
prerequisite is to have an XA aware DataSource. So use 
pax-jdbc-pool-dbcp2 and you should be fine.

XA Transactions should not take more time then DB transactions. In JEE 
application servers the recommended way is to always use XA 
transactions. I would treat karaf like an JEE application server as it 
has a similar role.

Christian


On 16.03.2015 15:52, ellirael wrote:
> Christian, thanks. You're right. Coonnection doesn't take part in
> transaction. And it is strange for me that I cannot use declarative
> transactions in Karaf with JDBC.
>
> Please, explain me, why I should use pax-jdbc in both cases?
> Afaik, database drivers includes XADataSource implementation that supports
> pooling. I can simply create blueprint file like that created with
> jdbc:create command.
> How aries wrapper links with pooling? Pooling usualy emplemented by
> DataSource.
>
> Read your tutorials. Thanks for info about blueprint-maven plugin.
> Is it impossible now to use declarative JTA with JDBC?
>
> Does JTA delegate transaction to JDBCConnection when only one Resource in
> transaction and it is DstaSource? I mean if I use manual correct way:
> getTransManager, enslitRes and so on. I'm afraid that XA transaction takes
> much more time and resources than Database transaction.
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-JTA-and-JDBC-DataSource-tp4039081p4039087.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


Mime
View raw message