<?xml version="1.0" encoding="UTF-8"?>


<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:kie="http://drools.org/schema/kie-aries-blueprint/1.0.0"
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0
           http://drools.org/schema/kie-aries-blueprint org/kie/kie-aries-blueprint.xsd">

  <kie:kmodule id="basics" >
    <kie:kbase name="drl_kiesample" packages="drl_kiesample">
      <!-- stateful sessions -->
      <kie:ksession name="ConsoleLogger-statefulSession" type="stateful">
        <kie:consoleLogger/>
        <!--<kie:batch>
          <kie:set-global identifier="persons" ref="globalList"/>
        </kie:batch>-->
      </kie:ksession>

      <kie:ksession name="FileLogger-statefulSession" type="stateful">
        <kie:fileLogger id="sf_fl_logger" file="#{ systemProperties['java.io.tmpdir'] }/drools-log1"/>
        <!--<kie:batch>
          <kie:set-global identifier="persons" ref="globalList"/>
        </kie:batch>-->
      </kie:ksession>

      <kie:ksession name="ThreadedFileLogger-statefulSession" type="stateful">
        <kie:fileLogger id="sf_tfl_logger" file="#{ systemProperties['java.io.tmpdir'] }/drools-log2" threaded="true"
                        interval="5"/>
        <!--<kie:batch>
          <kie:set-global identifier="persons" ref="globalList"/>
        </kie:batch>-->
      </kie:ksession>

      <!-- stateless sessions -->
      <kie:ksession name="ConsoleLogger-statelessSession" type="stateless">
        <kie:consoleLogger/>
      </kie:ksession>

      <kie:ksession name="k2" type="stateless">
        <kie:consoleLogger/>
      </kie:ksession>

      <kie:ksession name="k1" type="stateless">
        <kie:consoleLogger id="k1_console_logger"/>
        <kie:fileLogger id="k1_logger" file="#{ systemProperties['java.io.tmpdir'] }/drools-log3"/>
      </kie:ksession>

      <kie:ksession name="ThreadedFileLogger-statelessSession" type="stateless">
        <kie:fileLogger id="ss_tfl_logger" file="#{ systemProperties['java.io.tmpdir'] }/drools-log4" threaded="true"
                        interval="5"/>
      </kie:ksession>

      <kie:ksession name="FileLogger-statelessSession" type="stateless">
        <kie:fileLogger id="ss_fl_logger" file="#{ systemProperties['java.io.tmpdir'] }/drools-log5"/>
      </kie:ksession>

      <kie:ksession name="FileLogger-statelessSession-noNameLogger" type="stateless">
        <kie:fileLogger file="#{ systemProperties['java.io.tmpdir'] }/drools-log6"/>
      </kie:ksession>

      <kie:ksession name="loggerSession" type="stateless">
        <kie:consoleLogger id="ConsoleSessionLogger"/>
      </kie:ksession>

    </kie:kbase>
  </kie:kmodule>

  <bean id="globalList" class="java.util.ArrayList"/>
</blueprint>

