karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ellirael <ellir...@mail.ru>
Subject Karaf JTA and JDBC DataSource
Date Mon, 16 Mar 2015 07:41:25 GMT
Hi. When I use JTA with JPA everything works fine. Blueprint example:
    <bean id="jpaPersonService" class="mynamespace.JpaPersonService">
        <jpa:context property="entityManager" unitname="kb" />
        <tx:transaction method="addPerson changePerson deletePerson"
value="Required" />
    </bean>        

When I use JTA with JDBC DataSource transaction doesn't start. Blueprint
example:
    <reference id="dataSource" interface="javax.sql.DataSource"
               filter="(osgi.jndi.service.name=jdbc/kb)" />
    <bean id="jdbcPersonService" class="mynamespace.JdbcPersonService">
        <property name="dataSource" ref="dataSource" />
        <tx:transaction method="addPerson changePerson deletePerson"
value="Required" />
    </bean>

How can I do JTA and JDBC to be friends?



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

Mime
View raw message