AnsweredAssumed Answered

JTA with Tomee

Question asked by jeto1 on Sep 9, 2016
Hi,

I'm trying to configure activiti to use JTA within a tomee application server.
With the StandaloneProcessEngineConfiguration and a datasource everything works fine but as soon I'm trying to switch to JTA I'm getting this error

Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.transaction.jta.JtaTransactionManager' to required type 'javax.transaction.TransactionManager' for property 'transactionManager';


Here is my configuration


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd"
>
   
   <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName" value="java:comp/env/DBPIPPODS"/>
   </bean>
   
   <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
      <property name="transactionManagerName" value="java:comp/TransactionManager"/>
    </bean>
   
    <!– class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"–>
   
    <bean id="processEngineConfiguration"  
        class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration">

        <property name="dataSource" ref="dataSource" />
        <property name="transactionsExternallyManaged" value="true" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="jobExecutorActivate" value="false" />
     </bean>
</beans>

Outcomes