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

	<context:mbean-export server="mbeanServer"/>

	<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/>

	<si:channel id="channel">
		<si:queue/>
	</si:channel>

	<jmx:attribute-polling-channel-adapter id="adapter"
			channel="channel"
			object-name="org.springframework.integration.jmx.config:type=TestBean,name=testBean1"
			attribute-name="FirstMessage"
			auto-startup="false">
		<si:poller max-messages-per-poll="1" fixed-rate="2000"/>
	</jmx:attribute-polling-channel-adapter>

	<bean id="testBean1" class="org.springframework.integration.jmx.config.TestBean"/>

	<jmx:attribute-polling-channel-adapter id="autoChannel"
			object-name="org.springframework.integration.jmx.config:type=TestBean,name=testBean1"
			attribute-name="FirstMessage"
			auto-startup="false">
		<si:poller max-messages-per-poll="1" fixed-rate="2000"/>
	</jmx:attribute-polling-channel-adapter>

	<si:bridge input-channel="autoChannel" output-channel="nullChannel" />

</beans>
