karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ellirael <ellir...@mail.ru>
Subject Re: Karaf JTA and JDBC DataSource
Date Mon, 16 Mar 2015 15:27:40 GMT
Thanks again, Christian.

What is the difference between XADataSource and XA aware DataSource.
If I inject an XA aware DataSource and use blueprint.xml that I mention
earlier Transaction Manager will find my XA resource and start transaction?

What will it be if I injecty two or more XA aware DataSources and two or
more entity managers?
Will it be one global transaction be opened for all XA aware resourses?
Like that:
    <reference id="dataSource1" interface="XA aware DataSource"
               filter="(osgi.jndi.service.name=jdbc/kb)" />
    <reference id="dataSource2" interface="XA aware DataSource"
               filter="(osgi.jndi.service.name=jdbc/kb2)" />
    <bean id="jdbcPersonService" class="mynamespace.JdbcPersonService">
        <jpa:context property="entityManager" unitname="kb3" />
        <jpa:context property="entityManager" unitname="kb4" />
        <property name="dataSource1" ref="dataSource1" />
        <property name="dataSource2" ref="dataSource2" />
        <tx:transaction method="addPerson changePerson deletePerson"
value="Required" />
    </bean>



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-JTA-and-JDBC-DataSource-tp4039081p4039090.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message