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

Claus Ibsen commented on CAMEL-9649:
------------------------------------

I am having 2nd doubts about this as there is a performance penality with the 
reflection overhead and check for object factory. As a fallback converter the 
converter can potentially be invoked for any kind of convertion attempts that 
is not related to XML at all.

The check for annotation is very fast and so was not a problem. But the new 
check for ObjectFactory class is not.

> Do not require @XmlRootElement annotation in JAXB FallbackTypeConverter
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-9649
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9649
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jaxb
>            Reporter: Martin BasovnĂ­k
>            Assignee: Claus Ibsen
>             Fix For: 2.17.0
>
>
> We should fix method 
> {{org.apache.camel.converter.jaxb.FallbackTypeConverter#isJaxbType}}. It can 
> only handle beans with annotation  {{@XmlRootElement}} now. But this 
> annotation is not necessary. We should check if there is 
> {{ObjectFactory.java}} class in current java package and explore this class 
> if there is proper method returning {{JAXBElement<T>}} with annotation 
> {{@XmlElementDecl}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to