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

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

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


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

	<jmx:notification-listening-channel-adapter id="adapter"
			channel="channel"
			object-name="org.springframework.integration.jmx.config:type=TestPublisher,name=testPublisher"/>

	<bean id="testPublisher" class="org.springframework.integration.jmx.config.TestPublisher"/>

	<bean id="testPublisher2" class="org.springframework.integration.jmx.config.TestPublisher"/>

	<jmx:notification-listening-channel-adapter id="autoChannel"
			object-name="org.springframework.integration.jmx.config:type=TestPublisher,name=testPublisher"/>

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

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

	<jmx:notification-listening-channel-adapter id="patternAdapter"
			channel="patternChannel"
			object-name="org.springframework.integration.jmx.config:type=*,name=testPublisher"/>

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

	<jmx:notification-listening-channel-adapter id="multiAdapter"
			channel="multiChannel"
			object-name="#{patterns}"
			auto-startup="false"/>

	<util:list id="patterns">
		<value>org.springframework.integration.jmx.config:type=*,name=testPublisher</value>
		<value>org.springframework.integration.jmx.config:type=*,name=testPub*</value>
	</util:list>

</beans>
