You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ankelee <an...@gmail.com> on 2010/05/25 19:07:07 UTC

errorHandler + .handled(false)); in Spring DSL.

Hi

>From the doc pages:

errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));

I can't figure out or find any information as to how do the .handled() in
Spring DSL. I wan't to leave the exception unhandled so that I can have my
file endpoint do "move=" only if there is no exception in the route.
-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28670904.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Btw. Claus:

errorHandler(DLC stuff here).to("bean:xxx"); 

This doesn't seem to work. Can't do a .to anywhere on the errorHandler only
in the onException. Can't find any examples of this in Spring DSL either.
-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678470.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, May 27, 2010 at 9:10 AM, ankelee <an...@gmail.com> wrote:
>
> Oh, 2.3 was released, cool :)
>
> I redesigned the route and now has an acceptable behaviour.
>
> So what effects does that bug in onCompletion have exactly?
>

That if you change your routes that "original" file as the input on
the Exchange may not be around when you hit onCompletion.
So just take care if you change your route.



> --
> View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28690338.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Oh, 2.3 was released, cool :)

I redesigned the route and now has an acceptable behaviour.

So what effects does that bug in onCompletion have exactly?

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28690338.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, May 26, 2010 at 11:35 AM, ankelee <an...@gmail.com> wrote:
>
> Tested the onCompletion and it does exactly what I want in a clean manner. It
> seems to default to use the original message, this is great but I thought it
> would use the transformed message is it would be after the route.
>
> <onCompletion onCompleteOnly="true">
>        <to uri="file:data/in/backup" />
> </onCompletion>
>
>

Ah there was in fact a bug. I will fix that in Camel 2.4
https://issues.apache.org/activemq/browse/CAMEL-2758

And I will add a new option useOriginalBody which you can set = true
to tell Camel to use the original input.
So when you migrate to Camel 2.4 or never you have to use that option.


>
>
> ankelee wrote:
>>
>> Maybe I should reconsider the design.
>>
>> The problem stems from the fact that I want a copy of the original message
>> to go to two different places on success or failure.
>>
>> I'm thinking I could use onCompletion+onCompleteOnly to place a copy of
>> the succesfully processed file in a backup directory. This is fine but I
>> still haven't figured out how to get the original message out of the
>> UnitOfWork. If it's a file do i just get the file-handle and need to move
>> the file manually or?
>>
>>
>>
>>
>> ankelee wrote:
>>>
>>> Ok
>>>
>>> The reason I wanted to use the errorhandler was to have a general
>>> behaviour and then a number of specified onExceptions.
>>>
>>> I guess I would have to substitute the errorhandler for an onException
>>> that catches Exception.class. Just seems a little ugly.
>>>
>>>
>>>
>>> Claus Ibsen-2 wrote:
>>>>
>>>> On Wed, May 26, 2010 at 11:02 AM, ankelee <an...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Yes but then what about the messages that do not fail. I want them to
>>>>> be
>>>>> moved also. If I handle the exception on the errorhandler the
>>>>> file-endpoint
>>>>> does not register exception and the move-option is performed as if the
>>>>> route
>>>>> was succesful.
>>>>>
>>>>>
>>>>
>>>> Use onException which by default is handled=false.
>>>>
>>>>
>>>>>
>>>>> Claus Ibsen-2 wrote:
>>>>>>
>>>>>> On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Claus
>>>>>>>
>>>>>>> That's a good point.
>>>>>>>
>>>>>>> I want it to not be handled so the "move" option on the file endpoint
>>>>>>> in
>>>>>>> the
>>>>>>> beginning of my route only moves the file if the route was succesful.
>>>>>>> And
>>>>>>> I
>>>>>>> want to combine that with the errorhandling that the errorhandler can
>>>>>>> do
>>>>>>> since I want to do some custom processing before sending the message
>>>>>>> to a
>>>>>>> deadletterchannel. I would like to use moveFailed but that can't do
>>>>>>> what
>>>>>>> I
>>>>>>> want.
>>>>>>>
>>>>>>
>>>>>> For custom processing you just do that on the EH configuration
>>>>>>
>>>>>> errorHandler(DLC stuff here).to("bean:xxx");
>>>>>>
>>>>>> Then Camel invokes the bean:xxx BEFORE the message is moved into the
>>>>>> DLC.
>>>>>> In fact its just another Camel route so you can continue routing here
>>>>>> and do more steps.
>>>>>> And after this route completes the message will be moved to the DLC.
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Maybe I should do something else?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Claus Ibsen-2 wrote:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>>>>>>>> and remove stuff which would confuse people.
>>>>>>>> Why would you want to not let an error handler NOT to handle an
>>>>>>>> error.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> I do however see that your example in the JIRA ticket uses the
>>>>>>>>> handled
>>>>>>>>> property - when I try to do the same I just get:
>>>>>>>>>
>>>>>>>>> Caused by:
>>>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>>>>>> Line
>>>>>>>>> 70 in XML document from class path resource [opsigInboundRoute.xml]
>>>>>>>>> is
>>>>>>>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>>>>>>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to
>>>>>>>>> appear in
>>>>>>>>> element 'errorHandler'.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ankelee wrote:
>>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the
>>>>>>>>>> <errorHandler>
>>>>>>>>>> tag
>>>>>>>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>>>>>>>
>>>>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>>>>>>>> and
>>>>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>>>>>>>
>>>>>>>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ankelee wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi
>>>>>>>>>>>
>>>>>>>>>>> From the doc pages:
>>>>>>>>>>>
>>>>>>>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>>>>>>>
>>>>>>>>>>> I can't figure out or find any information as to how do the
>>>>>>>>>>> .handled()
>>>>>>>>>>> in
>>>>>>>>>>> Spring DSL. I wan't to leave the exception unhandled so that I
>>>>>>>>>>> can
>>>>>>>>>>> have
>>>>>>>>>>> my file endpoint do "move=" only if there is no exception in the
>>>>>>>>>>> route.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>>>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Claus Ibsen
>>>>>>>> Apache Camel Committer
>>>>>>>>
>>>>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>>>> Open Source Integration: http://fusesource.com
>>>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
>>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Claus Ibsen
>>>>>> Apache Camel Committer
>>>>>>
>>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>> Open Source Integration: http://fusesource.com
>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678153.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>>
>>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678441.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Tested the onCompletion and it does exactly what I want in a clean manner. It
seems to default to use the original message, this is great but I thought it
would use the transformed message is it would be after the route.

<onCompletion onCompleteOnly="true">
	<to uri="file:data/in/backup" />
</onCompletion>




ankelee wrote:
> 
> Maybe I should reconsider the design.
> 
> The problem stems from the fact that I want a copy of the original message
> to go to two different places on success or failure.
> 
> I'm thinking I could use onCompletion+onCompleteOnly to place a copy of
> the succesfully processed file in a backup directory. This is fine but I
> still haven't figured out how to get the original message out of the
> UnitOfWork. If it's a file do i just get the file-handle and need to move
> the file manually or?
> 
> 
> 
> 
> ankelee wrote:
>> 
>> Ok
>> 
>> The reason I wanted to use the errorhandler was to have a general
>> behaviour and then a number of specified onExceptions.
>> 
>> I guess I would have to substitute the errorhandler for an onException
>> that catches Exception.class. Just seems a little ugly.
>> 
>> 
>> 
>> Claus Ibsen-2 wrote:
>>> 
>>> On Wed, May 26, 2010 at 11:02 AM, ankelee <an...@gmail.com>
>>> wrote:
>>>>
>>>> Yes but then what about the messages that do not fail. I want them to
>>>> be
>>>> moved also. If I handle the exception on the errorhandler the
>>>> file-endpoint
>>>> does not register exception and the move-option is performed as if the
>>>> route
>>>> was succesful.
>>>>
>>>>
>>> 
>>> Use onException which by default is handled=false.
>>> 
>>> 
>>>>
>>>> Claus Ibsen-2 wrote:
>>>>>
>>>>> On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi Claus
>>>>>>
>>>>>> That's a good point.
>>>>>>
>>>>>> I want it to not be handled so the "move" option on the file endpoint
>>>>>> in
>>>>>> the
>>>>>> beginning of my route only moves the file if the route was succesful.
>>>>>> And
>>>>>> I
>>>>>> want to combine that with the errorhandling that the errorhandler can
>>>>>> do
>>>>>> since I want to do some custom processing before sending the message
>>>>>> to a
>>>>>> deadletterchannel. I would like to use moveFailed but that can't do
>>>>>> what
>>>>>> I
>>>>>> want.
>>>>>>
>>>>>
>>>>> For custom processing you just do that on the EH configuration
>>>>>
>>>>> errorHandler(DLC stuff here).to("bean:xxx");
>>>>>
>>>>> Then Camel invokes the bean:xxx BEFORE the message is moved into the
>>>>> DLC.
>>>>> In fact its just another Camel route so you can continue routing here
>>>>> and do more steps.
>>>>> And after this route completes the message will be moved to the DLC.
>>>>>
>>>>>
>>>>>
>>>>>> Maybe I should do something else?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Claus Ibsen-2 wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>>>>>>> and remove stuff which would confuse people.
>>>>>>> Why would you want to not let an error handler NOT to handle an
>>>>>>> error.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I do however see that your example in the JIRA ticket uses the
>>>>>>>> handled
>>>>>>>> property - when I try to do the same I just get:
>>>>>>>>
>>>>>>>> Caused by:
>>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>>>>> Line
>>>>>>>> 70 in XML document from class path resource [opsigInboundRoute.xml]
>>>>>>>> is
>>>>>>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>>>>>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to
>>>>>>>> appear in
>>>>>>>> element 'errorHandler'.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ankelee wrote:
>>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the
>>>>>>>>> <errorHandler>
>>>>>>>>> tag
>>>>>>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>>>>>>
>>>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>>>>>>> and
>>>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>>>>>>
>>>>>>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ankelee wrote:
>>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> From the doc pages:
>>>>>>>>>>
>>>>>>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>>>>>>
>>>>>>>>>> I can't figure out or find any information as to how do the
>>>>>>>>>> .handled()
>>>>>>>>>> in
>>>>>>>>>> Spring DSL. I wan't to leave the exception unhandled so that I
>>>>>>>>>> can
>>>>>>>>>> have
>>>>>>>>>> my file endpoint do "move=" only if there is no exception in the
>>>>>>>>>> route.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Claus Ibsen
>>>>>>> Apache Camel Committer
>>>>>>>
>>>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>>> Open Source Integration: http://fusesource.com
>>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Claus Ibsen
>>>>> Apache Camel Committer
>>>>>
>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> Open Source Integration: http://fusesource.com
>>>>> Blog: http://davsclaus.blogspot.com/
>>>>> Twitter: http://twitter.com/davsclaus
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678153.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>> 
>>> 
>>> 
>>> -- 
>>> Claus Ibsen
>>> Apache Camel Committer
>>> 
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678441.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Maybe I should reconsider the design.

The problem stems from the fact that I want a copy of the original message
to go to two different places on success or failure.

I'm thinking I could use onCompletion+onCompleteOnly to place a copy of the
succesfully processed file in a backup directory. This is fine but I still
haven't figured out how to get the original message out of the UnitOfWork.
If it's a file do i just get the file-handle and need to move the file
manually or?




ankelee wrote:
> 
> Ok
> 
> The reason I wanted to use the errorhandler was to have a general
> behaviour and then a number of specified onExceptions.
> 
> I guess I would have to substitute the errorhandler for an onException
> that catches Exception.class. Just seems a little ugly.
> 
> 
> 
> Claus Ibsen-2 wrote:
>> 
>> On Wed, May 26, 2010 at 11:02 AM, ankelee <an...@gmail.com>
>> wrote:
>>>
>>> Yes but then what about the messages that do not fail. I want them to be
>>> moved also. If I handle the exception on the errorhandler the
>>> file-endpoint
>>> does not register exception and the move-option is performed as if the
>>> route
>>> was succesful.
>>>
>>>
>> 
>> Use onException which by default is handled=false.
>> 
>> 
>>>
>>> Claus Ibsen-2 wrote:
>>>>
>>>> On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi Claus
>>>>>
>>>>> That's a good point.
>>>>>
>>>>> I want it to not be handled so the "move" option on the file endpoint
>>>>> in
>>>>> the
>>>>> beginning of my route only moves the file if the route was succesful.
>>>>> And
>>>>> I
>>>>> want to combine that with the errorhandling that the errorhandler can
>>>>> do
>>>>> since I want to do some custom processing before sending the message
>>>>> to a
>>>>> deadletterchannel. I would like to use moveFailed but that can't do
>>>>> what
>>>>> I
>>>>> want.
>>>>>
>>>>
>>>> For custom processing you just do that on the EH configuration
>>>>
>>>> errorHandler(DLC stuff here).to("bean:xxx");
>>>>
>>>> Then Camel invokes the bean:xxx BEFORE the message is moved into the
>>>> DLC.
>>>> In fact its just another Camel route so you can continue routing here
>>>> and do more steps.
>>>> And after this route completes the message will be moved to the DLC.
>>>>
>>>>
>>>>
>>>>> Maybe I should do something else?
>>>>>
>>>>>
>>>>>
>>>>> Claus Ibsen-2 wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>>>>>> and remove stuff which would confuse people.
>>>>>> Why would you want to not let an error handler NOT to handle an
>>>>>> error.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I do however see that your example in the JIRA ticket uses the
>>>>>>> handled
>>>>>>> property - when I try to do the same I just get:
>>>>>>>
>>>>>>> Caused by:
>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>>>> Line
>>>>>>> 70 in XML document from class path resource [opsigInboundRoute.xml]
>>>>>>> is
>>>>>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>>>>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear
>>>>>>> in
>>>>>>> element 'errorHandler'.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ankelee wrote:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the
>>>>>>>> <errorHandler>
>>>>>>>> tag
>>>>>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>>>>>
>>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>>>>>> and
>>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>>>>>
>>>>>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ankelee wrote:
>>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> From the doc pages:
>>>>>>>>>
>>>>>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>>>>>
>>>>>>>>> I can't figure out or find any information as to how do the
>>>>>>>>> .handled()
>>>>>>>>> in
>>>>>>>>> Spring DSL. I wan't to leave the exception unhandled so that I can
>>>>>>>>> have
>>>>>>>>> my file endpoint do "move=" only if there is no exception in the
>>>>>>>>> route.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Claus Ibsen
>>>>>> Apache Camel Committer
>>>>>>
>>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>> Open Source Integration: http://fusesource.com
>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678153.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>> 
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678272.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Ok

The reason I wanted to use the errorhandler was to have a general behaviour
and then a number of specified onExceptions.

I guess I would have to substitute the errorhandler for an onException that
catches Exception.class. Just seems a little ugly.



Claus Ibsen-2 wrote:
> 
> On Wed, May 26, 2010 at 11:02 AM, ankelee <an...@gmail.com> wrote:
>>
>> Yes but then what about the messages that do not fail. I want them to be
>> moved also. If I handle the exception on the errorhandler the
>> file-endpoint
>> does not register exception and the move-option is performed as if the
>> route
>> was succesful.
>>
>>
> 
> Use onException which by default is handled=false.
> 
> 
>>
>> Claus Ibsen-2 wrote:
>>>
>>> On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com>
>>> wrote:
>>>>
>>>> Hi Claus
>>>>
>>>> That's a good point.
>>>>
>>>> I want it to not be handled so the "move" option on the file endpoint
>>>> in
>>>> the
>>>> beginning of my route only moves the file if the route was succesful.
>>>> And
>>>> I
>>>> want to combine that with the errorhandling that the errorhandler can
>>>> do
>>>> since I want to do some custom processing before sending the message to
>>>> a
>>>> deadletterchannel. I would like to use moveFailed but that can't do
>>>> what
>>>> I
>>>> want.
>>>>
>>>
>>> For custom processing you just do that on the EH configuration
>>>
>>> errorHandler(DLC stuff here).to("bean:xxx");
>>>
>>> Then Camel invokes the bean:xxx BEFORE the message is moved into the
>>> DLC.
>>> In fact its just another Camel route so you can continue routing here
>>> and do more steps.
>>> And after this route completes the message will be moved to the DLC.
>>>
>>>
>>>
>>>> Maybe I should do something else?
>>>>
>>>>
>>>>
>>>> Claus Ibsen-2 wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>>>>> and remove stuff which would confuse people.
>>>>> Why would you want to not let an error handler NOT to handle an error.
>>>>>
>>>>>
>>>>>
>>>>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> I do however see that your example in the JIRA ticket uses the
>>>>>> handled
>>>>>> property - when I try to do the same I just get:
>>>>>>
>>>>>> Caused by:
>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>>> Line
>>>>>> 70 in XML document from class path resource [opsigInboundRoute.xml]
>>>>>> is
>>>>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>>>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear
>>>>>> in
>>>>>> element 'errorHandler'.
>>>>>>
>>>>>>
>>>>>>
>>>>>> ankelee wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the
>>>>>>> <errorHandler>
>>>>>>> tag
>>>>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>>>>
>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>>>>> and
>>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>>>>
>>>>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ankelee wrote:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> From the doc pages:
>>>>>>>>
>>>>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>>>>
>>>>>>>> I can't figure out or find any information as to how do the
>>>>>>>> .handled()
>>>>>>>> in
>>>>>>>> Spring DSL. I wan't to leave the exception unhandled so that I can
>>>>>>>> have
>>>>>>>> my file endpoint do "move=" only if there is no exception in the
>>>>>>>> route.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Claus Ibsen
>>>>> Apache Camel Committer
>>>>>
>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> Open Source Integration: http://fusesource.com
>>>>> Blog: http://davsclaus.blogspot.com/
>>>>> Twitter: http://twitter.com/davsclaus
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678153.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678238.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, May 26, 2010 at 11:02 AM, ankelee <an...@gmail.com> wrote:
>
> Yes but then what about the messages that do not fail. I want them to be
> moved also. If I handle the exception on the errorhandler the file-endpoint
> does not register exception and the move-option is performed as if the route
> was succesful.
>
>

Use onException which by default is handled=false.


>
> Claus Ibsen-2 wrote:
>>
>> On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com> wrote:
>>>
>>> Hi Claus
>>>
>>> That's a good point.
>>>
>>> I want it to not be handled so the "move" option on the file endpoint in
>>> the
>>> beginning of my route only moves the file if the route was succesful. And
>>> I
>>> want to combine that with the errorhandling that the errorhandler can do
>>> since I want to do some custom processing before sending the message to a
>>> deadletterchannel. I would like to use moveFailed but that can't do what
>>> I
>>> want.
>>>
>>
>> For custom processing you just do that on the EH configuration
>>
>> errorHandler(DLC stuff here).to("bean:xxx");
>>
>> Then Camel invokes the bean:xxx BEFORE the message is moved into the DLC.
>> In fact its just another Camel route so you can continue routing here
>> and do more steps.
>> And after this route completes the message will be moved to the DLC.
>>
>>
>>
>>> Maybe I should do something else?
>>>
>>>
>>>
>>> Claus Ibsen-2 wrote:
>>>>
>>>> Hi
>>>>
>>>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>>>> and remove stuff which would confuse people.
>>>> Why would you want to not let an error handler NOT to handle an error.
>>>>
>>>>
>>>>
>>>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com>
>>>> wrote:
>>>>>
>>>>> I do however see that your example in the JIRA ticket uses the handled
>>>>> property - when I try to do the same I just get:
>>>>>
>>>>> Caused by:
>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>>> Line
>>>>> 70 in XML document from class path resource [opsigInboundRoute.xml] is
>>>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
>>>>> element 'errorHandler'.
>>>>>
>>>>>
>>>>>
>>>>> ankelee wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler>
>>>>>> tag
>>>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>>>
>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>>>> and
>>>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>>>
>>>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>>>
>>>>>>
>>>>>>
>>>>>> ankelee wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> From the doc pages:
>>>>>>>
>>>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>>>
>>>>>>> I can't figure out or find any information as to how do the
>>>>>>> .handled()
>>>>>>> in
>>>>>>> Spring DSL. I wan't to leave the exception unhandled so that I can
>>>>>>> have
>>>>>>> my file endpoint do "move=" only if there is no exception in the
>>>>>>> route.
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678153.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Yes but then what about the messages that do not fail. I want them to be
moved also. If I handle the exception on the errorhandler the file-endpoint
does not register exception and the move-option is performed as if the route
was succesful.



Claus Ibsen-2 wrote:
> 
> On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com> wrote:
>>
>> Hi Claus
>>
>> That's a good point.
>>
>> I want it to not be handled so the "move" option on the file endpoint in
>> the
>> beginning of my route only moves the file if the route was succesful. And
>> I
>> want to combine that with the errorhandling that the errorhandler can do
>> since I want to do some custom processing before sending the message to a
>> deadletterchannel. I would like to use moveFailed but that can't do what
>> I
>> want.
>>
> 
> For custom processing you just do that on the EH configuration
> 
> errorHandler(DLC stuff here).to("bean:xxx");
> 
> Then Camel invokes the bean:xxx BEFORE the message is moved into the DLC.
> In fact its just another Camel route so you can continue routing here
> and do more steps.
> And after this route completes the message will be moved to the DLC.
> 
> 
> 
>> Maybe I should do something else?
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>>> and remove stuff which would confuse people.
>>> Why would you want to not let an error handler NOT to handle an error.
>>>
>>>
>>>
>>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com>
>>> wrote:
>>>>
>>>> I do however see that your example in the JIRA ticket uses the handled
>>>> property - when I try to do the same I just get:
>>>>
>>>> Caused by:
>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>>> Line
>>>> 70 in XML document from class path resource [opsigInboundRoute.xml] is
>>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
>>>> element 'errorHandler'.
>>>>
>>>>
>>>>
>>>> ankelee wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler>
>>>>> tag
>>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>>
>>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>>> and
>>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>>
>>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>>
>>>>>
>>>>>
>>>>> ankelee wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> From the doc pages:
>>>>>>
>>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>>
>>>>>> I can't figure out or find any information as to how do the
>>>>>> .handled()
>>>>>> in
>>>>>> Spring DSL. I wan't to leave the exception unhandled so that I can
>>>>>> have
>>>>>> my file endpoint do "move=" only if there is no exception in the
>>>>>> route.
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678153.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, May 26, 2010 at 10:54 AM, ankelee <an...@gmail.com> wrote:
>
> Hi Claus
>
> That's a good point.
>
> I want it to not be handled so the "move" option on the file endpoint in the
> beginning of my route only moves the file if the route was succesful. And I
> want to combine that with the errorhandling that the errorhandler can do
> since I want to do some custom processing before sending the message to a
> deadletterchannel. I would like to use moveFailed but that can't do what I
> want.
>

For custom processing you just do that on the EH configuration

errorHandler(DLC stuff here).to("bean:xxx");

Then Camel invokes the bean:xxx BEFORE the message is moved into the DLC.
In fact its just another Camel route so you can continue routing here
and do more steps.
And after this route completes the message will be moved to the DLC.



> Maybe I should do something else?
>
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> Handled is @deprecated on <errorHandler/>. We want to keep it easier
>> and remove stuff which would confuse people.
>> Why would you want to not let an error handler NOT to handle an error.
>>
>>
>>
>> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com> wrote:
>>>
>>> I do however see that your example in the JIRA ticket uses the handled
>>> property - when I try to do the same I just get:
>>>
>>> Caused by:
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>>> Line
>>> 70 in XML document from class path resource [opsigInboundRoute.xml] is
>>> invalid; nested exception is org.xml.sax.SAXParseException:
>>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
>>> element 'errorHandler'.
>>>
>>>
>>>
>>> ankelee wrote:
>>>>
>>>> Hi
>>>>
>>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler>
>>>> tag
>>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>>
>>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>>> and
>>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>>
>>>> and it seems that the handled-option is missing in Spring DSL?
>>>>
>>>>
>>>>
>>>> ankelee wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> From the doc pages:
>>>>>
>>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>>
>>>>> I can't figure out or find any information as to how do the .handled()
>>>>> in
>>>>> Spring DSL. I wan't to leave the exception unhandled so that I can have
>>>>> my file endpoint do "move=" only if there is no exception in the route.
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Hi Claus

That's a good point.

I want it to not be handled so the "move" option on the file endpoint in the
beginning of my route only moves the file if the route was succesful. And I
want to combine that with the errorhandling that the errorhandler can do
since I want to do some custom processing before sending the message to a
deadletterchannel. I would like to use moveFailed but that can't do what I
want.

Maybe I should do something else?



Claus Ibsen-2 wrote:
> 
> Hi
> 
> Handled is @deprecated on <errorHandler/>. We want to keep it easier
> and remove stuff which would confuse people.
> Why would you want to not let an error handler NOT to handle an error.
> 
> 
> 
> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com> wrote:
>>
>> I do however see that your example in the JIRA ticket uses the handled
>> property - when I try to do the same I just get:
>>
>> Caused by:
>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>> Line
>> 70 in XML document from class path resource [opsigInboundRoute.xml] is
>> invalid; nested exception is org.xml.sax.SAXParseException:
>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
>> element 'errorHandler'.
>>
>>
>>
>> ankelee wrote:
>>>
>>> Hi
>>>
>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler>
>>> tag
>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>
>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>> and
>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>
>>> and it seems that the handled-option is missing in Spring DSL?
>>>
>>>
>>>
>>> ankelee wrote:
>>>>
>>>> Hi
>>>>
>>>> From the doc pages:
>>>>
>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>
>>>> I can't figure out or find any information as to how do the .handled()
>>>> in
>>>> Spring DSL. I wan't to leave the exception unhandled so that I can have
>>>> my file endpoint do "move=" only if there is no exception in the route.
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28678072.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Willem Jiang <wi...@gmail.com>.
Hi Claus,

I found there is an unit tests[1] still use the handled(false) to demo 
the file will not be delete when the error happens.
If we are planing remove the Handled method, we also need to update this 
kind of test.

[1]https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFailureHandledTest.java

Willem

Claus Ibsen wrote:
> Hi
> 
> Handled is @deprecated on <errorHandler/>. We want to keep it easier
> and remove stuff which would confuse people.
> Why would you want to not let an error handler NOT to handle an error.
> 
> 
> 
> On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com> wrote:
>> I do however see that your example in the JIRA ticket uses the handled
>> property - when I try to do the same I just get:
>>
>> Caused by:
>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
>> 70 in XML document from class path resource [opsigInboundRoute.xml] is
>> invalid; nested exception is org.xml.sax.SAXParseException:
>> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
>> element 'errorHandler'.
>>
>>
>>
>> ankelee wrote:
>>> Hi
>>>
>>> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler> tag
>>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>>
>>> https://issues.apache.org/activemq/browse/CAMEL-1799
>>> and
>>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>>
>>> and it seems that the handled-option is missing in Spring DSL?
>>>
>>>
>>>
>>> ankelee wrote:
>>>> Hi
>>>>
>>>> From the doc pages:
>>>>
>>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>>
>>>> I can't figure out or find any information as to how do the .handled() in
>>>> Spring DSL. I wan't to leave the exception unhandled so that I can have
>>>> my file endpoint do "move=" only if there is no exception in the route.
>>>>
>>>
>> --
>> View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Handled is @deprecated on <errorHandler/>. We want to keep it easier
and remove stuff which would confuse people.
Why would you want to not let an error handler NOT to handle an error.



On Wed, May 26, 2010 at 10:26 AM, ankelee <an...@gmail.com> wrote:
>
> I do however see that your example in the JIRA ticket uses the handled
> property - when I try to do the same I just get:
>
> Caused by:
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 70 in XML document from class path resource [opsigInboundRoute.xml] is
> invalid; nested exception is org.xml.sax.SAXParseException:
> cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
> element 'errorHandler'.
>
>
>
> ankelee wrote:
>>
>> Hi
>>
>> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler> tag
>> in Spring DSL. I've been looking at the schema for 2.3 and also
>>
>> https://issues.apache.org/activemq/browse/CAMEL-1799
>> and
>> https://issues.apache.org/activemq/browse/CAMEL-1598
>>
>> and it seems that the handled-option is missing in Spring DSL?
>>
>>
>>
>> ankelee wrote:
>>>
>>> Hi
>>>
>>> From the doc pages:
>>>
>>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>>>
>>> I can't figure out or find any information as to how do the .handled() in
>>> Spring DSL. I wan't to leave the exception unhandled so that I can have
>>> my file endpoint do "move=" only if there is no exception in the route.
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
I do however see that your example in the JIRA ticket uses the handled
property - when I try to do the same I just get:

Caused by:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
70 in XML document from class path resource [opsigInboundRoute.xml] is
invalid; nested exception is org.xml.sax.SAXParseException:
cvc-complex-type.3.2.2: Attribute 'handled' is not allowed to appear in
element 'errorHandler'.



ankelee wrote:
> 
> Hi
> 
> Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler> tag
> in Spring DSL. I've been looking at the schema for 2.3 and also 
> 
> https://issues.apache.org/activemq/browse/CAMEL-1799
> and 
> https://issues.apache.org/activemq/browse/CAMEL-1598
> 
> and it seems that the handled-option is missing in Spring DSL?
> 
> 
> 
> ankelee wrote:
>> 
>> Hi
>> 
>> From the doc pages:
>> 
>> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
>> 
>> I can't figure out or find any information as to how do the .handled() in
>> Spring DSL. I wan't to leave the exception unhandled so that I can have
>> my file endpoint do "move=" only if there is no exception in the route.
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677820.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by ankelee <an...@gmail.com>.
Hi

Sorry I wasn't very clear. I'm using Camel 2.3 and the <errorHandler> tag in
Spring DSL. I've been looking at the schema for 2.3 and also 

https://issues.apache.org/activemq/browse/CAMEL-1799
and 
https://issues.apache.org/activemq/browse/CAMEL-1598

and it seems that the handled-option is missing in Spring DSL?



ankelee wrote:
> 
> Hi
> 
> From the doc pages:
> 
> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
> 
> I can't figure out or find any information as to how do the .handled() in
> Spring DSL. I wan't to leave the exception unhandled so that I can have my
> file endpoint do "move=" only if there is no exception in the route.
> 

-- 
View this message in context: http://old.nabble.com/errorHandler-%2B-.handled%28false%29%29--in-Spring-DSL.-tp28670904p28677711.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: errorHandler + .handled(false)); in Spring DSL.

Posted by Willem Jiang <wi...@gmail.com>.
Here is an example[1] that you can take a look.
[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringDeadLetterChannelHandledPolicyTest.xml

Willem
ankelee wrote:
> Hi
> 
>>>From the doc pages:
> 
> errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliverDealy(5000).handled(false));
> 
> I can't figure out or find any information as to how do the .handled() in
> Spring DSL. I wan't to leave the exception unhandled so that I can have my
> file endpoint do "move=" only if there is no exception in the route.