08-21-2011 06:30 AM
<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>
08-21-2011 07:22 AM
08-21-2011 12:34 PM
08-22-2011 04:46 AM
08-22-2011 01:51 PM
<property name="transactionsExternallyManaged" value="true" />
in the processEngineConfiguration?08-22-2011 02:08 PM
08-22-2011 06:34 PM
08-23-2011 12:10 AM
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?
08-23-2011 02:33 AM
08-23-2011 02:50 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.