[ 
https://issues.apache.org/activemq/browse/CAMEL-1799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58496#action_58496
 ] 

Claus Ibsen commented on CAMEL-1799:
------------------------------------

Hi Willem

I have more comments
- The class ErrorHandlerDefintion is misspelt - it should be Definition
- I think we should let the <errorHandler> support the most commonly used 
options and therefore remove some of the advanced options you really newer use 
anyway
- option handled should be removed (in fact I think we should @deprecated it on 
the Java DSL error handler builder as well)
- I do not think we should add the new notion you added to set those advanced 
options they way you do. Its really not easy to use and intuitive as its a 
notion that we do not already use in other places.

I think the following code should be removed
{code}
    @XmlElements({
        @XmlElement(name = "exceptionPolicyStrategy",  required = false),
        @XmlElement(name = "onRedelivery", required = false),
        @XmlElement(name = "failureProcessor", required = false),
        @XmlElement(name = "transactionTemplate", required = false),
        @XmlElement(name = "deadLetter", required = false)})
    private List beans; 
{code}

And instead I propose to add String to indicate ref's instead which can be 
attributes in the XML instead. And only use these two options:
- onRedeliveryRef
- transactionTemplateRef
the reset is *not* commonly needed. In fact failureProcessors is *not* 
something end users should configure. Its an *internal* thing Camel uses.



> Spring DSL - Add error handler DSL support so we avoid having to use spring 
> bean style
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1799
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1799
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>    Affects Versions: 2.0-M2
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: Future
>
>
> We could use an DSL for error handling in Spring DSL
> Then we can use the <redeliveryPolicy/> tag as well. And have an enum to 
> specify the type in case we want a dead letter channel instead or 
> transactional instead
> {code:xml}
> <errorHandler id="myErrorHandler" type="DeadLetterChannel">
>     <deadLetter uri="log:dead"/>
>     <redeliveryPolicy maximumRedeliveries="5" logStackTrace="true" 
> backOffMultiplier="2"/>
> </errorHandler>
> {code}
>                    

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to