[
https://issues.apache.org/jira/browse/CAMEL-16486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17321037#comment-17321037
]
Pasquale Congiusti commented on CAMEL-16486:
--------------------------------------------
I've seen that the definition of parsers is delegated to a maven plugin which
is in charge to automatically build yaml parsers from model classes annotated
as @XmlRootElement. The ErrorHandlers configuration are specifically set as
@XmlTransient (ie,
https://github.com/apache/camel/blob/master/core/camel-core-model/src/main/java/org/apache/camel/model/errorhandler/ErrorHandlerRefConfiguration.java#L21).
I understand there must be some reason that I miss, however I wonder if that
reason is still in place. If it's not, we could make the change and probably
solve this issue just setting them with the @XmlRootElement annotation. With
this solution (if possible) we'll keep a strong alignment between the model and
the deserializer.
Otherwise the solution would be to manually parse the properties with ad-hoc
builders (one for each different error handler). With this approach we may
experience some compatibility problem when we change the ErrorHandler model
definitions in the future though.
[~lburgazzoli], wdyt?
> camel-yaml-dsl-deserializers ErrorHandlerBuilder can parse only Ref
> -------------------------------------------------------------------
>
> Key: CAMEL-16486
> URL: https://issues.apache.org/jira/browse/CAMEL-16486
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.9.0
> Reporter: Pasquale Congiusti
> Assignee: Pasquale Congiusti
> Priority: Minor
> Fix For: 3.10.0
>
>
> We are not providing the possibility to parse any ErrorHandlerBuilder which
> is not a ref:
> https://github.com/apache/camel/blob/master/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/main/java/org/apache/camel/dsl/yaml/deserializers/ErrorHandlerBuilderDeserializer.java#L35
> We should extend it to be able to parse all expected ErrorHandlerBuilder
> properties.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)