You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/08/11 08:34:20 UTC

[jira] [Comment Edited] (CAMEL-10233) SpringCamelContext should lazy load ModelJAXBContextFactory

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

Claus Ibsen edited comment on CAMEL-10233 at 8/11/16 8:33 AM:
--------------------------------------------------------------

I am making the same code change for camel-blueprint so they are similar.


was (Author: davsclaus):
Make the same code change for camel-blueprint so they are similar.

> SpringCamelContext should lazy load ModelJAXBContextFactory
> -----------------------------------------------------------
>
>                 Key: CAMEL-10233
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10233
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>    Affects Versions: 2.17.0
>            Reporter: James Netherton
>            Assignee: Claus Ibsen
>             Fix For: 2.18.0, 2.17.4
>
>
> The SpringCamelContext contains a constructor where it does:
> {code}
> setModelJAXBContextFactory(new SpringModelJAXBContextFactory());
> {code}
> This should ideally be done lazilly (which is how the DefaultCamelContext does things). 
> The issue with having this logic in the constructor is that when super() is called, camel will fire the 'context created' event. If a context create event handler happens to set the JAXBContextFactory, it ends up being overwritten later on in the SpringCamelContext constructor.



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