L.S., You mention this was working in ServiceMix 3.2.2, but what version are you trying this with now? A more recent version might include Camel 2.x, which might account for some of the changes in behavior you're seeing.
What happens to the original exchange? If it is ending in ERROR now instead of with a DONE, you can force Camel to consider the exception handled by adding .handled(true) to the onException clause. If that's not the case, could you show us the status sequence for the exchange that goes to the RoutingService and the one that gets sent to the ReponseGeneratorService to help us figure out what's going on inside the ESB. Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On 12 March 2010 10:49, pratibhaG <[email protected]> wrote: > > Hi, > > I have following configuration in my camel Route builder class. > > > package com.in2m.servicemix.operations.changepassword; > > import org.apache.camel.builder.RouteBuilder; > import com.in2m.servicemix.common.errorhandling.ErrorConstants; > > public class MessageRouting extends RouteBuilder { > > public void configure() { > onException(java.lang.Throwable.class) > .setBody(constant("<response><status>"+ > ErrorConstants.SYSTEM_ERROR > +"</status><message>System Error</message></response>")) > > .to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out"); > > onException(java.net.SocketException.class) > .setBody(constant("<response><status>"+ > ErrorConstants.SOCKET_ERROR > +"</status><message>Connection Error</message></response>")) > > .to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out"); > > > from("jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService") > .choice() > .when(header("userPrincipals").contains("director")) > > .to("jbi:service:http://servicemix.in2m.com/operations/changepassword/PortalService?mep=in-out") > .when(header("userPrincipals").contains("portal")) > > .to("jbi:service:http://servicemix.in2m.com/operations/changepassword/DirectorService?mep=in-out"); > } > } > > > I am sending a message suppose <request>bbb</request</> which reaches > jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService. > After that the message reaches DirectorService and tries to connect to some > application represented by Directorservice. It gets connection error hece > following gets executed: > > onException(java.net.SocketException.class) > .setBody(constant("<response><status>"+ > ErrorConstants.SOCKET_ERROR > +"</status><message>Connection Error</message></response>")) > > .to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out"); > > ResponseGenerator creates out message but that message is not sent back to > jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService > > even after I give ResponseGeneratorService?mep=in-out what is the cause. > This was working with 3.2.2 > > Please help > > -- > View this message in context: > http://old.nabble.com/How-would-the-message-flow-in-following-case-of-Servicemix3.3.1-tp27874114p27874114.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > >
