hmm, this may need an enhancement, have a read through this thread:
http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-td4347185.html

you may get some more info on the camel user list.

On 23 May 2011 15:43, Brendan Long <bren...@realgo.com> wrote:
> I tried setting the exception listener on the JmsConfiguration bean but
> I still get "Execution of JMS message listener failed, and no
> ErrorHandler has been set."
>
>
> On 5/23/2011 5:48 AM, Gary Tully wrote:
>> I wonder about the execution order of the property setters:
>>
>> <property name="configuration" ref="jmsMediaTransferConfig"/>
>> <property name="exceptionListener" ref="exampleExceptionListener"/>
>>
>> the exceptionListener accessor delegates to getConfiguration().set...
>>
>> so if "configuration" is set after the exceptionListener it will override.
>>
>> One way to eliminate this possibility is to set the exceptionListener
>> on your jmsMediaTransferConfig bean.
>>
>> On 20 May 2011 16:34, Brendan Long <bren...@realgo.com> wrote:
>>> Hi,
>>>
>>> I'm just wondering if there's any way to get rid of this message:
>>>
>>> WARN  org.apache.camel.component.jms.JmsMessageListenerContainer -
>>> Execution of JMS message listener failed, and no ErrorHandler has been set.
>>>
>>> I tried setting an error handler on my ActiveMQComponent:
>>>
>>> <bean id="exampleExceptionListener" class="com.example.ExceptionListener"/>
>>> <bean id="activemq"
>>> class="org.apache.activemq.camel.component.ActiveMQComponent">
>>>    <property name="configuration" ref="jmsMediaTransferConfig"/>
>>>    <property name="exceptionListener" ref="exampleExceptionListener"/>
>>> </bean>
>>>
>>> That didn't seem to have any effect. I also have a LoggingErrorHandler
>>> for the route (with its own annoying stack traces), and I tried an empty
>>> <onException>, but that didn't work either:
>>>
>>> <errorHandler id="camelErrorHandler" logName="mediaTransfer"
>>>    type="LoggingErrorHandler" level="WARN"
>>> xmlns="http://camel.apache.org/schema/spring";>
>>> </errorHandler>
>>>
>>> <camelContext id="camelContext"
>>> xmlns="http://camel.apache.org/schema/spring";
>>>    errorHandlerRef="camelErrorHandler">
>>>    <endpoint id="source" uri="activemq:queue:thing1"/>
>>>    <endpoint id="destination" uri="file:/invalid/path"/>
>>>    <route>
>>>        <from ref="source"/>
>>>        <transacted/>
>>>        <process ref="aProcessor"/>
>>>        <to ref="destination"/>
>>>        <onException>
>>>            <exception>java.lang.Exception</exception>
>>>            <stop/>
>>>        </onException>
>>>    </route>
>>> </camelContext>
>>>
>>> Is there something I'm missing or does this option just not exist?
>>>
>>
>>
>
>



-- 
http://fusesource.com
http://blog.garytully.com

Reply via email to