<?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">

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

	<context:mbean-export default-domain="#{T(java.util.UUID).randomUUID().toString()}"/>

	<jmx:mbean-export default-domain="#{T(java.util.UUID).randomUUID().toString()}"/>

	<si:message-history/>

	<si:channel id="channel"/>

	<si:channel id="org.springframework.integration.test.anon"/>

	<jmx:notification-publishing-channel-adapter
			id="adapter" channel="channel"
			object-name="test.publisher:name=publisher"
			default-notification-type="default.type">
		<jmx:request-handler-advice-chain>
			<bean class="org.springframework.integration.jmx.config.NotificationPublishingChannelAdapterParserTests.FooAdvice"/>
		</jmx:request-handler-advice-chain>
	</jmx:notification-publishing-channel-adapter>


	<si:chain id="chainWithJmxNotificationPublishing" input-channel="publishingWithinChainChannel">
		<jmx:notification-publishing-channel-adapter
				id="jmx-notification-publishing-channel-adapter-within-chain"
				object-name="test.publisher:name=publisher-chain"
				default-notification-type="default.type"/>
	</si:chain>

	<bean id="testListener" class="org.springframework.integration.jmx.config.TestListener"/>

</beans>
