<?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">
<!-- Spring property configurer which allows us to use system properties (such as user.name).
Here we can define the numberOfAccounts to feed, injected to the PreLoader bean -->
<bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="properties">
<props>
<prop key="numberOfAccounts">100</prop>
</props>
</property>
</bean>
<os-core:giga-space-context/>
<!-- A bean representing a space (an IJSpace implementation).
Note, we perform a lookup on the space since we are working against a remote space. -->
<os-core:space id="space" url="jini://*/*/spaceQueries"/>
<os-core:giga-space id="gigaSpace" space="space"/>
<bean id="accountPreLoader" class="com.gigaspaces.examples.tutorials.queries.feeder.AccountPreLoader">
<property name="numberOfAccounts" value="${numberOfAccounts}" />
</bean>
<!-- The Data feeder bean, writing new OrderEvents objects to the space in a constant interval.
The depends-on attribute ensures the feeder bean will start only after the pre-loader bean is done -->
<bean id="orderEventFeeder" class="com.gigaspaces.examples.tutorials.queries.feeder.OrderEventFeeder" depends-on="accountPreLoader"/>
</beans>