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

SpringCamelContext should lazy load ModelJAXBContextFactory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17.0
    • Fix Version/s: 2.17.4, 2.18.0
    • Component/s: camel-spring
    • Labels:
      None
    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: