karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: Karaf JTA and JDBC DataSource
Date Mon, 16 Mar 2015 07:47:15 GMT
Hi,

Afaik the transaction manager only works in conjunction of a EntityManager
as in your first example.
For the second one it requires some different handling. For this you need
to open an issue at the Aries Project.

regards, Achim

2015-03-16 8:41 GMT+01:00 ellirael <ellirael@mail.ru>:

> 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.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Mime
View raw message