hi all
First of all i have to say that I'm totally newbie to Spring Integration. I'm playing with cafe demo adding support to Message Bus's error-channel and throwing exceptios from handler methods. Here is my configuration xml
I have an errorListener class subscribed to errorChannel, and it log exceptions throwed from prepareColdDrink or prepareHotDrink, but it doesn't get any descriptive information about the exception, onlyCode:<message-bus error-channel="errorChannel"/> <annotation-driven/> <context:component-scan base-package="org.springframework.integration.samples.cafe"/> <channel id="errorChannel" publish-subscribe="true" /> <channel id="orders"/> <channel id="drinks"/> <channel id="coldDrinks"/> <channel id="hotDrinks"/> <handler-endpoint input-channel="coldDrinks" handler="barista" method="prepareColdDrink" /> <handler-endpoint input-channel="hotDrinks" handler="barista" method="prepareHotDrink" />Here is my errorListener class.Code:Handler method 'null' threw an Exception.
(I have substituted 'at' symbols by # because forum's URL filter)Code:#MessageEndpoint (input="errorChannel") public class errorListener { #Handler public void handle(Message message) { System.out.println("errorListener: "+message.getPayload()); }
If the DrinkRouter throws the exception i get a little more descriptive message. The complete path of the method that throwed the exception.
I would know what is needed to get, at least, the name of the method that caused the exception.Code:Handler method 'public java.lang.String org.springframework.integration.samples.cafe.DrinkRouter.resolveDrinkChannel(org.springframework.integration.samples.cafe.Drink) throws java.lang.Exception' threw an Exception.
It would be nice to get a more descriptive information about the exception in errorChannel.


Reply With Quote