Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10233

SpringCamelContext should lazy load ModelJAXBContextFactory

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.17.0
    • 2.17.4, 2.18.0
    • camel-spring
    • None
    • Unknown

    Description

      The SpringCamelContext contains a constructor where it does:

      setModelJAXBContextFactory(new SpringModelJAXBContextFactory());
      

      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.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              jamesnetherton James Netherton
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: