camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: propagate bean invocation exception back to remote caller
Date Wed, 04 Aug 2010 09:45:51 GMT
Jim Newsham wrote:
> Hi Willem,
> Thanks for the fast reply.  After adding the transferException option to 
> the jms url on both the client and the server, I am now seeing the 
> exception propagate to the client.  The only remaining problem is that 
> the exception thrown by the remote service (i.e., LoginException) is 
> wrapped in a RuntimeCamelException.  I am sure I could write my own 
> proxy implementation that unwraps the exception without too much 
> trouble, but I am wondering if this is something that Camel's proxy 
> should do on its own.  What do you think?

I'm afraid you have to do it yourself after calling the proxy.
BTW, if you don't want Camel to redeliver the exchange which is failed, 
you may consider to disable the ErrorHandler[1]


Apache Camel, Apache CXF committer
Open Source Integration

> Thanks,
> Jim
> On 8/3/2010 4:55 PM, Willem Jiang wrote:
>> Hi,
>> You are using activemq component to make Client and Server talk to 
>> each other. Please set the option transferException=true on your 
>> activemq endpoint, the default value of this option is false.
>> Here is note for it which is token from Camel JMS wiki[1].
>> "Camel 2.0: If enabled and you are using Request Reply messaging 
>> (InOut) and an Exchange failed on the consumer side, then the caused 
>> Exception will be send back in response as a javax.jms.ObjectMessage. 
>> If the client is Camel, the returned Exception is rethrown. This 
>> allows you to use Camel JMS as a bridge in your routing - for example, 
>> using persistent queues to enable robust routing. Notice that if you 
>> also have transferExchange enabled, this option takes precedence. The 
>> caught exception is required to be serializable. The original 
>> Exception on the consumer side can be wrapped in an outer exception 
>> such as org.apache.camel.RuntimeCamelException when returned to the 
>> producer."
>> [1]
>> Willem
>> ----------------------------------
>> Apache Camel, Apache CXF committer
>> Open Source Integration
>> Blog
>> Tiwtter

View raw message