No. It is fixed only for IN_ONLY direction. But we are using IN_OUT and the code for it remains the same.
-- Regards Mateusz Nowakowski -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthieu Riou Sent: Wednesday, November 28, 2007 4:58 PM To: [email protected] Subject: Re: OdeService does not set error to the message exchange Hi, I've fixed it on the 1.1 branch, would you give it a try and see if it works for you? Thanks! Matthieu On Nov 27, 2007 5:46 AM, Nowakowski, Mateusz < [EMAIL PROTECTED]> wrote: > When there's exception thrown in the OdeService.invokeOde: > > org.apache.ode.jbi.msgmap.MessageTranslationException: Could not find a > mapper for request message for JBI MEX ID:10.136.44.164- > 11681241c72-4:7; ODE MEX 4611686018427387904 is failed. > at org.apache.ode.jbi.OdeService.invokeOde(OdeService.java:240) > at > org.apache.ode.jbi.OdeService.onJbiMessageExchange(OdeService.java:148) > at > org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(Jb > iMessageExchangeEventRouter.java:47) > at org.apache.ode.jbi.Receiver$1.run(Receiver.java:179) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) > at java.util.concurrent.FutureTask.run(FutureTask.java:123) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto > r.java:650) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja > va:675) > at java.lang.Thread.run(Thread.java:595) > > The exception is caught in onJbiMessageExchange, by the following code: > > try { > invokeOde(jbiMex, ((InOut) jbiMex).getInMessage()); > success = true; > } catch (Exception ex) { > __log.error("Error invoking ODE.", ex); > err = ex; > } catch (Throwable t) { > __log.error("Unexpected error invoking ODE.", t); > err = new RuntimeException(t); > } finally { > // If we got an error that wasn't sent. > if (jbiMex.getStatus() == ExchangeStatus.ACTIVE && > !success) { > if (err != null && jbiMex.getError() != null) { > jbiMex.setError(err); > } > jbiMex.setStatus(ExchangeStatus.ERROR); > _ode.getChannel().send(jbiMex); > } > } > The condition (err != null && jbiMex.getError() != null) leads to a > situation, > that the status of the MEX is set to ExchangeStatus.ERROR, but the error > of the MEX is not set (!) > > At the end of the day, the endpoint that invoked ODE, gets following > error: > java.lang.Exception: Unkown error (exchange aborted ?) > at > org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpCo > nsumerEndpoint.java:263) > at > org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja > va:71) > > because it cannot find the error in the MEX. > > -- > Regards > Mateusz Nowakowski > >
