<?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="orderEventProcessor" class="com.gigaspaces.examples.tutorials.parallelprocessing.processor.OrderEventProcessor"/>
<!-- A polling event container that performs (by default) polling take operations with txn
support against the space using the provided template (in our case, the approved orderEvent objects).
Once a match is found, the data processor bean event listener is triggered using the
annotation adapter (the method anotated @SpaceDataEvent inside the class is invoked). -->
<os-events:polling-container id="orderEventProcessorPollingEventContainer" 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="Approved"/>
</bean>
</os-core:template>
<os-events:listener>
<os-events:annotation-adapter>
<os-events:delegate ref="orderEventProcessor"/>
</os-events:annotation-adapter>
</os-events:listener>
</os-events:polling-container>
</beans>