<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="
http://www.springframework.org/schema/beans"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:kie="
http://drools.org/schema/kie-spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<kie:kmodule id="kModule">
<kie:kbase name="rules" packages="rules">
<kie:ksession name="ksession1" type="stateful">
<kie:batch>
<kie:fire-until-halt/>
</kie:batch>
<kie:configuration>
<kie:jpa-persistence>
<kie:transaction-manager ref="txManager"/>
<kie:entity-manager-factory ref="myEmf"/>
</kie:jpa-persistence>
</kie:configuration>
</kie:ksession>
</kie:kbase>
</kie:kmodule>
<kie:environment id="env">
<kie:entity-manager-factory ref="myEmf"/>
<kie:transaction-manager ref="txManager"/>
</kie:environment>
<bean class="org.postgresql.ds.PGPoolingDataSource" id="jbpm-ds">
<property name="serverName" value="localhost"></property>
<property name="databaseName" value="drools"></property>
<property name="portNumber" value="5432"></property>
<property name="user" value="DWP"></property>
<property name="password" value="DWP"></property>
</bean>
<bean id="myEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="jbpm-ds"/>
<property name="persistenceUnitName" value="org.jbpm.persistence.jpa.local"/>
</bean>
<bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="myEmf"/>
</bean>
<bean id="kiePostProcessor" class="org.drools.osgi.spring.OsgiKModuleBeanFactoryPostProcessor"/>
<bean id="fireALlRulesCommand" class="com.execute.command.FireAllRules"/>
<bean id="fireUntilHaltCommand" class="com.execute.command.FireUntilHalt"/>
<bean id="factStudent" class="com.test.facts.Student"/>
<camelContext xmlns="
http://camel.apache.org/schema/spring">
<route trace="false" id="testRoute">
<from uri="timer:testRoute?period=10s"/>
<to uri="log:message"/>
<bean method="initStudent" ref="factStudent"/>
<to uri="kie:ksession1?action=insertBody" id="AgeVerification"/>
<!--
<bean method="fireUntilHalt" ref="fireUntilHaltCommand"/>
<to uri="kie:ksession1?action=execute"/>
-->
</route>
</camelContext>
</beans>