INT-4181: Refactor IMBE to use IntMngmtConfigurer

JIRA: https://jira.spring.io/browse/INT-4181

* To avoid duplicate code move actual `Metrics` resolution to the `IntegrationManagementConfigurer` and delegate from the `IntegrationMBeanExporter` for backward compatibility
* Minor refactoring and improvements in the `IntegrationMBeanExporter`
* Fix typos in the `jms/AsyncGatewayTests`

**Cherry-pick to 4.3.x**
This commit is contained in:
Artem Bilan
2016-12-15 18:58:19 -05:00
committed by Gary Russell
parent 7eeb4e3535
commit 4026753b40
3 changed files with 125 additions and 109 deletions

View File

@@ -112,7 +112,7 @@ public class AsyncGatewayTests {
assertThat(error.getPayload(), instanceOf(MessagingException.class));
assertThat(((MessagingException) error.getPayload()).getCause(), instanceOf(JmsTimeoutException.class));
assertEquals("foo", ((MessagingException) error.getPayload()).getFailedMessage().getPayload());
this.gateway1.stop();
this.gateway2.stop();
}
@Test
@@ -128,7 +128,7 @@ public class AsyncGatewayTests {
assertNotNull(received);
org.springframework.messaging.Message<?> error = errors.receive(1000);
assertNull(error);
this.gateway1.stop();
this.gateway2.stop();
}
@Configuration
@@ -138,7 +138,7 @@ public class AsyncGatewayTests {
@Bean
public CachingConnectionFactory ccf() {
return new CachingConnectionFactory(
new ActiveMQConnectionFactory("vm://localhosti?broker.persistent=false"));
new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"));
}
@Bean