<environment-definition>
  <environment-factory>
    <properties name="orchestra-properties" resource="orchestra.properties"/>
    <hibernate-configuration name="hibernate-configuration:core">
      <properties resource="hibernate.properties"/>
      <mappings resource="hibernate/bpel.core.mappings.xml"/>
      <cache-configuration resource="hibernate/bpel.cache.definition.xml" usage="nonstrict-read-write"/>
      <!-- cache-configuration for runtime data. Must be used with a replicated cache when used in cluster -->
      <!-- <cache-configuration resource='hibernate/bpel.cache.runtime.xml' usage='read-write' /> -->
    </hibernate-configuration>
    <hibernate-session-factory configuration="hibernate-configuration:core" init="eager" name="hibernate-session-factory:core"/>
    <command-service>
      <orchestra-retry-interceptor delay="100" delay-factor="4" max-delay="10000" retries="10"/>
      <environment-interceptor/>
      <standard-transaction-interceptor/>
    </command-service>
    <invoke-executor threads="10"/>
    <job-executor auto-start="false" limit-job-per-instance="false" lock="180000" threads="10"/>
    <dead-job-handler class="org.ow2.orchestra.services.handlers.impl.ExitInstanceDeadJobHandler"/>
    <repository class="org.ow2.orchestra.services.impl.DbRepository"/>
    <publisher class="org.ow2.orchestra.cxf.CxfPublisher"/>
    <invoker class="org.ow2.orchestra.cxf.CxfInvoker" name="serviceInvoker"/>
  </environment-factory>
  <environment>
    <hibernate-session factory="hibernate-session-factory:core" name="hibernate-session:core"/>
    <runtime-db-session name="runtime-session:core" session="hibernate-session:core"/>
    <transaction/>
    <timer-session retries="50"/>
    <message-session retries="50" use-fair-scheduling="false"/>
    <job-db-session session="hibernate-session:core"/>
    <chainer name="recorder">
      <recorder class="org.ow2.orchestra.persistence.log.LoggerRecorder"/>
    </chainer>
    <chainer name="archiver">
      <archiver class="org.ow2.orchestra.persistence.log.LoggerArchiver"/>
    </chainer>
    <queryApi name="queryList"/>
    <chainer name="finished-instance-handler">
      <finished-instance-handler class="org.ow2.orchestra.services.handlers.impl.DeleteFinishedInstanceHandler"/>
    </chainer>
    <chainer name="undeployed-process-handler">
      <undeployed-process-handler class="org.ow2.orchestra.services.handlers.impl.NoOpUndeployedProcessHandler"/>
    </chainer>
  </environment>
</environment-definition>
