<?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:os-core="http://www.openspaces.org/schema/core"
xmlns:os-events="http://www.openspaces.org/schema/events"
xmlns:os-remoting="http://www.openspaces.org/schema/remoting"
xmlns:os-sla="http://www.openspaces.org/schema/sla"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.openspaces.org/schema/core http://www.openspaces.org/schema/core/openspaces-core.xsd
http://www.openspaces.org/schema/events http://www.openspaces.org/schema/events/openspaces-events.xsd
http://www.openspaces.org/schema/remoting http://www.openspaces.org/schema/remoting/openspaces-remoting.xsd
http://www.openspaces.org/schema/sla http://www.openspaces.org/schema/sla/openspaces-sla.xsd">
<os-core:giga-space-context/>
<!-- A bean representing a space (an IJSpace implementation).
Note, we do not specify here the cluster topology of the space. It is declared outside of
the processing unit or within the SLA bean. -->
<os-core:space id="space" url="jini://*/*/spacePP"/>
<os-core:giga-space id="gigaSpace" space="space" tx-manager="transactionManager"/>
<os-core:local-tx-manager id="transactionManager" space="space"/>
<bean id="orderEventValidator" class="com.gigaspaces.examples.tutorials.parallelprocessing.validator.OrderEventValidator"/>
<!-- A polling event container that performs (by default) polling take operations against
the space using the provided template (in our case, the new orderEvents objects).
Once a match is found, the orderEvent validator bean event listener is triggered using the
annotation adapter, the listener method is annotated inside the bean with the @SpaceDataEvent
annotation. -->
<os-events:polling-container id="orderEventValidatorPollingEventContainer" giga-space="gigaSpace">
<os-events:tx-support tx-manager="transactionManager"/>
<os-core:template>
<bean class="com.gigaspaces.examples.tutorials.parallelprocessing.common.OrderEvent">
<property name="status" value="New"/>
</bean>
</os-core:template>
<os-events:listener>
<os-events:annotation-adapter>
<os-events:delegate ref="orderEventValidator"/>
</os-events:annotation-adapter>
</os-events:listener>
</os-events:polling-container>
</beans>