camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucas Amador <>
Subject JPA component and JTA
Date Fri, 05 Oct 2012 13:34:10 GMT
I'm struggling trying to configure a camel route which uses JPA and a JTA transaction manager
(bitronix) together with Spring. As I can read in the JPA component documentation,
the transactionManager can be specified in the route URI just configuring the transactionManager
option in the route URI. But I can't make it work.

the transaction manager is working well with the JMS component, but I don't know how to configure
the jpa route URI's. I got the next stack trace error, which makes totally sense.

org.apache.camel.FailedToCreateRouteException: Failed to create route productJmsPersistenceTransactedWithException
at: >>> Transacted[] <<< in route: Route[[From[jms:queue:xxx.yyy]] ->
[OnException[[class ja... because of Failed to resolve endpoint: jpa://com.example.Person?transactionManager=jtaTransactionManager
due to: Could not find a suitable setter for property: transactionManager as there isn't a
setter method with same type: java.lang.String nor type conversion possible: No type converter
available to convert from type: java.lang.String to the required type: org.springframework.transaction.PlatformTransactionManager
with value jtaTransactionManager

spring configuration excerpt

<bean id="btmTransactionManager" class="bitronix..." />

<bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
  <property name="transactionManager" ref="btmTransactionManager" />
  <property name="userTransaction" ref="btmTransactionManager" />

<camel:to uri="jpa:com.example.Person?transactionManager=jtaTransactionManager" />

Any idea?


Lucas Amador

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message