Hi all. So I've been trying to implement a simple example using the new advice chain feature based on the SI reference.
Unfortunately, while the service, which simply creates a message and sends it to a service activator which then throws a MessageHandlingException, works just fine, I'm not getting any sort of retry logic, and STS isn't recognizing the <request-handler-advice-chain> element. All I get is the MessageHandlingException, when according to the reference, the task scheduler should be attempting retries.
Here's my full context...
Has anyone attempted to implement this component? I saw that there was an example of its use in the latest examples, but it seems like I've essentially done the same in terms of my context, and there shouldn't be anything wrong with my main class or my service activator bean class. I definitely have spring-integration-core in my POM as well.Code:<?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:int="http://www.springframework.org/schema/integration" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> <int:channel id="inputChannel" /> <int:channel id="outputChannel"> <int:queue /> </int:channel> <int:service-activator input-channel="inputChannel" output-channel="outputChannel" ref="messageDestroyer"> <int:request-handler-advice-chain> <bean class="org.springframework.integration.handler.advice.RequestHandlerRetryAdvice" /> </int:request-handler-advice-chain> </int:service-activator> <bean id="messageDestroyer" class="com.cigna.examples.advice.main.MessageDestroyer" /> </beans>
Any ideas?
Thanks.


Reply With Quote