-
1. Re: Component servicemix-bean as a Binding Component: ERROR bouncing
bsnyder May 15, 2008 2:35 PM (in response to roger)I'm using the servicemix-bean component for Java-based connectivity outside the NMR. Thus, my servicemix-bean-based component acts as a BC on the ESB. On this subject, I have two questions:
1. Is this usage of servicemix-bean encouraged? I'm using it to access a Java-based interface only available by method calls, so creating a separate BC only performing the actual over-the-wire communication is not an option.
This is not a problem at all. Using the servicemix-bean component allows you to access POJOs and other Java APIs using native Java.
2. It might happen that the external service (the one accessed through the Java method calls) for some reason rejects the call. In some of these cases I may want to retry the call, but in most cases I would not like to -- hence I would like set the MessageExchange's ExchangeStatus to ERROR (correct?). The ERROR state, as far as I've understood, is similar to the DONE state in the way the the communication is closed (correct?).
To a certain, yes.
Now to my actual second question:
Did you forget to post the question?
-
2. Re: Component servicemix-bean as a Binding Component: ERROR bouncing
roger May 15, 2008 3:43 PM (in response to bsnyder)Grmbl, my last question disappeared somehow...
Anyway, what I wanted to know is how to handle the situation in which my Java call somehow is unsuccessful. Thus, I want to set the current MessageExchange to ERROR, but I also want to report the error to an external receiver via another Outbound Binding Component. One idea is to send a new message, containing the error message, to that Binding Component. Is that a feasible solution?
Regards,
Roger