<?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="dataSourceFactory" class="org.kie.spring.jbpm.tools.SpringDataSourceFactory">
    <property name="xaClassName" value="org.h2.jdbcx.JdbcDataSource" />
    <property name="driverClassName" value="org.h2.Driver" />
    <property name="uniqueName" value="jdbc/jbpm-ds-#{T(java.lang.Thread).currentThread().getName()}-#{T(java.util.Calendar).getInstance().getTimeInMillis()}" />
    <property name="driverProperties">
      <props>
        <prop key="user">sa</prop>
        <prop key="password"></prop>
        <prop key="url">jdbc:h2:mem:jbpm-db;MVCC=true</prop>
      </props>
    </property>
  </bean>

  <bean id="poolingDataSource" factory-bean="dataSourceFactory" factory-method="setupPoolingDataSource" destroy-method="close"/>
</beans>