/
SpringTransactionIntegrationTest-context.xml
67 lines (52 loc) · 3.5 KB
/
SpringTransactionIntegrationTest-context.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<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">
<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="org.h2.Driver" />
<property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=-1" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
<!-- turn off metrics reporter -->
<property name="dbMetricsReporterActivate" value="false" />
<property name="telemetryReporterActivate" value="false" />
<property name="taskMetricsEnabled" value="false" />
<property name="enforceHistoryTimeToLive" value="false" />
</bean>
<bean id="processEngine" class="org.camunda.bpm.engine.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" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="userBean" class="org.camunda.bpm.engine.spring.test.transaction.UserBean">
<property name="runtimeService" ref="runtimeService" />
<property name="taskService" ref="taskService" />
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="printer" class="org.camunda.bpm.engine.spring.test.transaction.Printer" />
<bean id="beanWithException" class="org.camunda.bpm.engine.spring.test.transaction.BeanWithException" />
<bean id="serviceTaskBean" class="org.camunda.bpm.engine.spring.test.transaction.ServiceTaskBean">
<property name="beanWithException" ref="beanWithException" />
</bean>
<bean id="failingTransactionListenerDelegate" class="org.camunda.bpm.engine.spring.test.transaction.FailingTransactionListenerDelegate" />
<bean id="transactionRollbackDelegate" class="org.camunda.bpm.engine.spring.test.transaction.TransactionRollbackDelegate">
<property name="transactionManager" ref="transactionManager" />
</bean>
</beans>