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

camel-dozer: Multiple contexts / bundles - Does not use the correct classloader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.15.1
    • 2.14.3, 2.15.3, 2.16.0
    • camel-dozer
    • None
    • Unknown

    Description

      Dozer is a tough library to work with in a multi-module context, because of its use of singletons for configuration. In an OSGi environment, each bundle will have its own classloader but Dozer's architecture makes it impossible to cater for this scenario nicely. Unfortunately, it expects a single container-wide classloader configured in the BeanContainer singleton.

      In Camel we worked around this by providing a custom DozerClassLoader implementation that is aware of the Camel Context, but what happens if we are sharing Dozer across multiple Camel Contexts? The most recently initialized context will override the container-wide classloader.

      We need a solution such that the classloader can dynamically change based on the Camel Context that is using the component.

      Attachments

        Issue Links

          Activity

            People

              raulvk Raúl Kripalani
              raulvk Raúl Kripalani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: