INT-1623 replaced 'exception-mapper' with 'error-channel' on 'gateway' and JMS 'inbound-gateway' elements
This commit is contained in:
@@ -23,16 +23,19 @@
|
||||
|
||||
<int-jms:inbound-gateway request-destination="requestQueueB"
|
||||
request-channel="jmsinputchannel"
|
||||
exception-mapper="errorMessageMapper"/>
|
||||
error-channel="errorTransformationChannel"/>
|
||||
|
||||
<int-jms:inbound-gateway request-destination="requestQueueA"
|
||||
request-channel="jmsinputchannel"/>
|
||||
|
||||
<int-jms:inbound-gateway request-destination="requestQueueC"
|
||||
request-channel="jmsinputchannel"
|
||||
exception-mapper="errorMessageMapper"/>
|
||||
error-channel="errorTransformationChannel"/>
|
||||
|
||||
<bean id="errorMessageMapper" class="org.springframework.integration.jms.config.ExceptionHandlingSiConsumerTests$SampleErrorMessageMapper"/>
|
||||
<int:transformer input-channel="errorTransformationChannel">
|
||||
<bean id="errorTransformer" class="org.springframework.integration.jms.config.ExceptionHandlingSiConsumerTests$SampleErrorTransformer"/>
|
||||
</int:transformer>
|
||||
|
||||
<int:channel id="jmsinputchannel"/>
|
||||
|
||||
<int:router input-channel="jmsinputchannel" expression="payload"/>
|
||||
|
||||
@@ -30,14 +30,12 @@ import org.junit.Test;
|
||||
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.mapping.InboundMessageMapper;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
import org.springframework.jms.core.MessageCreator;
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
*
|
||||
*/
|
||||
public class ExceptionHandlingSiConsumerTests {
|
||||
|
||||
@@ -120,8 +118,8 @@ public class ExceptionHandlingSiConsumerTests {
|
||||
}
|
||||
|
||||
|
||||
public static class SampleErrorMessageMapper implements InboundMessageMapper<Throwable> {
|
||||
public org.springframework.integration.Message<?> toMessage(Throwable t) throws Exception {
|
||||
public static class SampleErrorTransformer {
|
||||
public org.springframework.integration.Message<?> transform(Throwable t) throws Exception {
|
||||
return MessageBuilder.withPayload(t.getCause().getMessage()).build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user