<?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:int="http://www.springframework.org/schema/integration"
	   xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
	   xmlns:util="http://www.springframework.org/schema/util"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/jms https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
		http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd">

	<int-jms:message-driven-channel-adapter channel="jmsInputChannel" container="container"/>

	<int-jms:message-driven-channel-adapter channel="jmsInputChannel" destination="queueB"
											error-channel="testErrorChannel"/>

	<int:service-activator input-channel="jmsInputChannel">
		<bean id="testService" class="org.springframework.integration.jms.config.InboundOneWayErrorTests$TestService"/>
	</int:service-activator>

	<int:channel id="testErrorChannel">
		<int:queue/>
	</int:channel>

	<bean id="queueA" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="oneway.a"/>
	</bean>

	<bean id="queueB" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="oneway.b"/>
	</bean>

	<bean id="container" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
		<property name="connectionFactory" ref="jmsConnectionFactory"/>
		<property name="destination" ref="queueA"/>
		<property name="errorHandler" ref="testErrorHandler"/>
	</bean>

	<bean id="testErrorHandler"
		  class="org.springframework.integration.jms.config.InboundOneWayErrorTests$TestErrorHandler"/>

	<util:constant id="jmsConnectionFactory"
				   static-field="org.springframework.integration.jms.ActiveMQMultiContextTests.connectionFactory"/>

</beans>
