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" />

When I use JTA with JDBC DataSource transaction doesn't start. Blueprint
    <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" />

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.

View raw message