As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" 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 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <tx:annotation-driven transaction-manager="transactionManager"/> <bean id="actDatasource" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init" destroy-method="close"> <property name="uniqueName" value="java/actdb" /> <property name="minPoolSize" value="0" /> <property name="maxPoolSize" value="10" /> <property name="driverProperties"> <props> <prop key="user">root</prop> <prop key="password"></prop> <prop key="url">jdbc:mysql://localhost/activiti</prop> </props> </property> <property name="className" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" /> <property name="allowLocalTransactions" value="true" /> <property name="enableJdbc4ConnectionTest" value="true"/> </bean> <bean id="JtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" > <property name="transactionManager" ref="bitronixTransactionManager" /> <property name="userTransaction" ref="bitronixTransactionManager" /> </bean> <bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices"> <property name="serverId" value="spring-btm" /> </bean> <!– create BTM transaction manager –> <bean id="bitronixTransactionManager" factory-method="getTransactionManager" class="bitronix.tm.TransactionManagerServices" depends-on="btmConfig" destroy-method="shutdown" > <property name="transactionTimeout" value="6000000"/> </bean> <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration"> <property name="dataSource" ref="actDatasource" /> <property name="transactionManager" ref="bitronixTransactionManager" /> <property name="databaseSchemaUpdate" value="true" /> <property name="jobExecutorActivate" value="false" /> <property name="history" value="audit" /> </bean> <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"> <property name="processEngineConfiguration" ref="processEngineConfiguration" /> </bean> <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" /> <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" /> <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" lazy-init="false"/> <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" /> <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" /> <bean id="formService" factory-bean="processEngine" factory-method="getFormService" /> </beans>
<br><property name="transactionsExternallyManaged" value="true" /><br>
If thay are not the same transaction manager, sure it makes a difference, not only for activiti, but for any system. 2 jta transaction managers does not make any sense at all to me
Does a Spring managed JTA transaction(with an implementation of Bitronix) OR an Application Server (Glassfish) managed JTA transaction make any difference for Activiti?