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

	<jmx:operation-invoking-channel-adapter id="input"
			object-name="org.springframework.integration.jmx.config:type=TestBean,name=testBeanAdapter"
			operation-name="test">
		<jmx:request-handler-advice-chain>
			<bean class="org.springframework.integration.jmx.config.OperationInvokingChannelAdapterParserTests.FooAdvice" />
		</jmx:request-handler-advice-chain>
	</jmx:operation-invoking-channel-adapter>

	<jmx:operation-invoking-channel-adapter id="operationWithNonNullReturn"
			object-name="org.springframework.integration.jmx.config:type=TestBean,name=testBeanAdapter"
			operation-name="testWithReturn"/>

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

	<si:chain input-channel="operationInvokingWithinChain">
		<jmx:operation-invoking-channel-adapter
				object-name="org.springframework.integration.jmx.config:type=TestBean,name=testBeanAdapter"
				operation-name="test"/>
	</si:chain>

	<si:chain id="chainWithOperation" input-channel="operationWithinChainWithNonNullReturn">
		<jmx:operation-invoking-channel-adapter id="operationWithinChainWithNonNullReturnHandler"
				object-name="org.springframework.integration.jmx.config:type=TestBean,name=testBeanAdapter"
				operation-name="testWithReturn"/>
	</si:chain>

	<jmx:operation-invoking-channel-adapter id="input2"/>

</beans>
