<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                         http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">

        <tx:annotation-driven transaction-manager="transactionManager" />

        <bean id="dataSource"
                class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
                <property name="targetDataSource">
                        <bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
                                <property name="driverClass" value="org.h2.Driver" />
                                <property name="url"
                                        value="jdbc:h2:mem:task-engine;NON_KEYWORDS=KEY,VALUE;DB_CLOSE_DELAY=1000;IGNORECASE=TRUE;LOCK_MODE=0" />
                                <property name="username" value="SA" />
                                <property name="password" value="SA" />
                        </bean>
                </property>
        </bean>

        <bean id="transactionManager"
                class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
                <property name="dataSource" ref="dataSource" />
        </bean>

        <bean id="taskEngineConfiguration" class="pro.taskana.SpringTaskEngineConfiguration">
                <property name="dataSource" ref="dataSource" />
                <property name="transactionManager" ref="transactionManager" />
        </bean>

        <bean id="taskEngine" factory-bean="taskEngineConfiguration" factory-method="createTaskEngineConfiguration" />
        <bean id="taskService" factory-bean="taskEngine" factory-method="getTaskService" />

        <bean class="pro.taskana.common.internal.transaction.TaskanaComponent" />
</beans>
