<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:groovy="http://www.springframework.org/schema/integration/groovy"
	xsi:schemaLocation="http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/groovy https://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

	<channel id="output">
		<queue/>
	</channel>

	 <beans:bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
        <beans:property name="scopes">
            <beans:map>
                <beans:entry key="thread" value="org.springframework.context.support.SimpleThreadScope"/>
                <beans:entry key="request" value="org.springframework.web.context.request.RequestScope"/>
            </beans:map>
        </beans:property>
    </beans:bean>

	<groovy:control-bus input-channel="input" output-channel="output" send-timeout="100" order="1" auto-startup="true"
						customizer="groovyCustomizer">
		<groovy:request-handler-advice-chain>
			<beans:bean class="org.springframework.integration.groovy.config.GroovyControlBusTests$FooAdvice" />
		</groovy:request-handler-advice-chain>
	</groovy:control-bus>

	<beans:bean id="service" class="org.springframework.integration.groovy.config.GroovyControlBusTests$Service" />

	<beans:bean id="threadScopedService"
				scope="thread"
				class="org.springframework.integration.groovy.config.GroovyControlBusTests$Service" />

	<beans:bean id="requestScopedService"
				scope="request"
				class="org.springframework.integration.groovy.config.GroovyControlBusTests$Service" />

	<beans:bean id="nonManagedService" class="org.springframework.integration.groovy.config.GroovyControlBusTests$NonManagedService" />

	<beans:bean id="abstractService" class="org.springframework.integration.groovy.config.GroovyControlBusTests$Service"
			abstract="true"/>

	<beans:bean id="prototypeService" class="org.springframework.integration.groovy.config.GroovyControlBusTests$Service"
			scope="prototype"/>

	<beans:bean id="groovyCustomizer"
			class="org.springframework.integration.groovy.config.GroovyControlBusTests$MyGroovyCustomizer"/>

</beans:beans>
