<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
             xmlns="http://xmlns.jcp.org/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">

  <persistence-unit name="scriptRunner" transaction-type="JTA">
    <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    <jta-data-source>jdbc/testDS1</jta-data-source>

    <class>org.jbpm.persistence.scripts.oldentities.ProcessInstanceInfo</class>
    <class>org.jbpm.persistence.scripts.oldentities.SessionInfo</class>
    <class>org.jbpm.persistence.scripts.oldentities.TaskImpl</class>
    <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
    <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
    <class>org.jbpm.services.task.impl.model.CommentImpl</class>
    <class>org.jbpm.services.task.impl.model.ContentImpl</class>
    <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
    <class>org.jbpm.services.task.impl.model.GroupImpl</class>
    <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
    <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.OrganizationalEntityImpl</class>
    <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskDefImpl</class>
    <class>org.jbpm.services.task.impl.model.UserImpl</class>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.max_fetch_depth" value="3"/>
      <!-- No value for hbm2ddl.auto, because tests manage DDL themselves. -->
      <property name="hibernate.hbm2ddl.auto" value=""/>
      <property name="hibernate.show_sql" value="false"/>

      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>

      <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost//home/jenkins/workspace/031.Releasing_KIE_deployLocally-7.0.x/jbpm/jbpm-installer/target/jbpm-test;MVCC=TRUE"/>
      <property name="hibernate.connection.username" value="sa"/>
      <property name="hibernate.connection.password" value="sasa"/>
      <property name="hibernate.default_schema" value="public"/>

      <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
      <property name="hibernate.id.new_generator_mappings" value="false"/>

      <!-- The following line is what's used in Hibernate 4 instead of a TransactionManagerLookup class -->
      <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform"/>
    </properties>
  </persistence-unit>
  <persistence-unit name="dbTesting" transaction-type="JTA">
    <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    <jta-data-source>jdbc/testDS2</jta-data-source>
    <mapping-file>META-INF/JBPMorm.xml</mapping-file>

    <!-- drools-persistence-jpa -->
    <class>org.drools.persistence.info.SessionInfo</class>
    <class>org.drools.persistence.info.WorkItemInfo</class>
    <!-- jbpm-persistence-api -->
    <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
    <class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
    <class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
    <!-- jbpm-runtime-manager -->
    <class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
    <!-- jbpm-kie-services -->
    <class>org.jbpm.kie.services.impl.store.DeploymentStoreEntry</class>
    <class>org.jbpm.kie.services.impl.query.persistence.QueryDefinitionEntity</class>
    <!-- jbpm-human-task-jpa -->
    <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
    <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
    <class>org.jbpm.services.task.impl.model.CommentImpl</class>
    <class>org.jbpm.services.task.impl.model.ContentImpl</class>
    <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
    <class>org.jbpm.services.task.impl.model.GroupImpl</class>
    <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
    <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.OrganizationalEntityImpl</class>
    <!-- Unknown entity.. some deprecated thing? -->
    <!--<class>org.jbpm.services.task.impl.model.\</class>-->
    <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskDefImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskImpl</class>
    <class>org.jbpm.services.task.impl.model.UserImpl</class>
    <!-- jbpm-human-task-audit -->
    <class>org.jbpm.services.task.audit.impl.model.AuditTaskImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.BAMTaskSummaryImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.TaskEventImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.TaskVariableImpl</class>
    <!-- jbpm-executor -->
    <class>org.jbpm.executor.entities.ErrorInfo</class>
    <class>org.jbpm.executor.entities.RequestInfo</class>
    <!-- jbpm-audit -->
    <class>org.jbpm.process.audit.NodeInstanceLog</class>
    <class>org.jbpm.process.audit.ProcessInstanceLog</class>
    <class>org.jbpm.process.audit.VariableInstanceLog</class>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.max_fetch_depth" value="3"/>
      <property name="hibernate.hbm2ddl.auto" value="validate"/>
      <property name="hibernate.show_sql" value="false"/>

      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>

      <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost//home/jenkins/workspace/031.Releasing_KIE_deployLocally-7.0.x/jbpm/jbpm-installer/target/jbpm-test;MVCC=TRUE"/>
      <property name="hibernate.connection.username" value="sa"/>
      <property name="hibernate.connection.password" value="sasa"/>
      <property name="hibernate.default_schema" value="public"/>

      <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
      <property name="hibernate.id.new_generator_mappings" value="false"/>

      <!-- The following line is what's used in Hibernate 4 instead of a TransactionManagerLookup class -->
      <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform"/>
    </properties>
  </persistence-unit>
  <persistence-unit name="dbTestingUpdate" transaction-type="JTA">
    <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    <jta-data-source>jdbc/testDS3</jta-data-source>
    <mapping-file>META-INF/JBPMorm.xml</mapping-file>

    <!-- drools-persistence-jpa -->
    <class>org.drools.persistence.info.SessionInfo</class>
    <class>org.drools.persistence.info.WorkItemInfo</class>
    <!-- jbpm-persistence-api -->
    <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
    <!-- Unknown entity.. some deprecated thing? -->
    <!--<class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>-->
    <class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
    <class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
    <!-- jbpm-runtime-manager -->
    <class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
    <!-- jbpm-kie-services -->
    <class>org.jbpm.kie.services.impl.store.DeploymentStoreEntry</class>
    <class>org.jbpm.kie.services.impl.query.persistence.QueryDefinitionEntity</class>
    <!-- jbpm-human-task-jpa -->
    <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
    <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
    <class>org.jbpm.services.task.impl.model.CommentImpl</class>
    <!-- Unknown entity.. some deprecated thing? -->
    <!--<class>org.jbpm.services.task.impl.model.CompletionBehaviorImpl</class>-->
    <class>org.jbpm.services.task.impl.model.ContentImpl</class>
    <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
    <class>org.jbpm.services.task.impl.model.GroupImpl</class>
    <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
    <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.OrganizationalEntityImpl</class>
    <!-- Unknown entity.. some deprecated thing? -->
    <!--<class>org.jbpm.services.task.impl.model.\</class>-->
    <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskDefImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskImpl</class>
    <class>org.jbpm.services.task.impl.model.UserImpl</class>
    <!-- jbpm-human-task-audit -->
    <class>org.jbpm.services.task.audit.impl.model.AuditTaskImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.BAMTaskSummaryImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.TaskEventImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.TaskVariableImpl</class>
    <!-- jbpm-executor -->
    <class>org.jbpm.executor.entities.ErrorInfo</class>
    <class>org.jbpm.executor.entities.RequestInfo</class>
    <!-- jbpm-audit -->
    <class>org.jbpm.process.audit.NodeInstanceLog</class>
    <class>org.jbpm.process.audit.ProcessInstanceLog</class>
    <class>org.jbpm.process.audit.VariableInstanceLog</class>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.max_fetch_depth" value="3"/>
      <property name="hibernate.hbm2ddl.auto" value="update"/>
      <property name="hibernate.show_sql" value="false"/>

      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>

      <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost//home/jenkins/workspace/031.Releasing_KIE_deployLocally-7.0.x/jbpm/jbpm-installer/target/jbpm-test;MVCC=TRUE"/>
      <property name="hibernate.connection.username" value="sa"/>
      <property name="hibernate.connection.password" value="sasa"/>
      <property name="hibernate.default_schema" value="public"/>

      <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
      <property name="hibernate.id.new_generator_mappings" value="false"/>

      <!-- The following line is what's used in Hibernate 4 instead of a TransactionManagerLookup class -->
      <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform"/>
    </properties>
  </persistence-unit>
  <persistence-unit name="clearSchema" transaction-type="JTA">
    <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    <jta-data-source>jdbc/testDS4</jta-data-source>
    <mapping-file>META-INF/JBPMorm.xml</mapping-file>
    <!-- drools-persistence-jpa -->
    <class>org.drools.persistence.info.SessionInfo</class>
    <class>org.drools.persistence.info.WorkItemInfo</class>
    <!-- jbpm-persistence-api -->
    <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
    <!-- Unknown entity.. some deprecated thing? -->
    <!--<class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>-->
    <class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
    <class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
    <!-- jbpm-runtime-manager -->
    <class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
    <!-- jbpm-kie-services -->
    <class>org.jbpm.kie.services.impl.store.DeploymentStoreEntry</class>
    <class>org.jbpm.kie.services.impl.query.persistence.QueryDefinitionEntity</class>
    <!-- jbpm-human-task-jpa -->
    <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
    <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
    <class>org.jbpm.services.task.impl.model.CommentImpl</class>
    <class>org.jbpm.services.task.impl.model.ContentImpl</class>
    <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
    <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
    <class>org.jbpm.services.task.impl.model.GroupImpl</class>
    <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
    <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
    <class>org.jbpm.services.task.impl.model.OrganizationalEntityImpl</class>
    <!-- Unknown entity.. some deprecated thing? -->
    <!--<class>org.jbpm.services.task.impl.model.\</class>-->
    <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskDefImpl</class>
    <class>org.jbpm.services.task.impl.model.TaskImpl</class>
    <class>org.jbpm.services.task.impl.model.UserImpl</class>
    <!-- jbpm-human-task-audit -->
    <class>org.jbpm.services.task.audit.impl.model.AuditTaskImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.BAMTaskSummaryImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.TaskEventImpl</class>
    <class>org.jbpm.services.task.audit.impl.model.TaskVariableImpl</class>
    <!-- jbpm-executor -->
    <class>org.jbpm.executor.entities.ErrorInfo</class>
    <class>org.jbpm.executor.entities.RequestInfo</class>
    <!-- jbpm-audit -->
    <class>org.jbpm.process.audit.NodeInstanceLog</class>
    <class>org.jbpm.process.audit.ProcessInstanceLog</class>
    <class>org.jbpm.process.audit.VariableInstanceLog</class>

    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzBlobTriggers</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzCalendars</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzCronTriggers</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzFiredTriggers</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzJobDetails</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzJobListeners</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzLocks</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzPausedTriggerGrps</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzSchedulerState</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzSimpleTriggers</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzTriggerListeners</class>
    <class>org.jbpm.persistence.scripts.quartzmockentities.QrtzTriggers</class>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.max_fetch_depth" value="3"/>
      <!-- No value for hbm2ddl.auto, because tests manage DDL themselves. -->
      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      <property name="hibernate.show_sql" value="false"/>

      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>

      <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost//home/jenkins/workspace/031.Releasing_KIE_deployLocally-7.0.x/jbpm/jbpm-installer/target/jbpm-test;MVCC=TRUE"/>
      <property name="hibernate.connection.username" value="sa"/>
      <property name="hibernate.connection.password" value="sasa"/>
      <property name="hibernate.default_schema" value="public"/>

      <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
      <property name="hibernate.id.new_generator_mappings" value="false"/>

      <!-- The following line is what's used in Hibernate 4 instead of a TransactionManagerLookup class -->
      <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform"/>
    </properties>
  </persistence-unit>

</persistence>
