James Netherton created CAMEL-10233:
---------------------------------------

             Summary: 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
            Reporter: James Netherton


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)

Reply via email to