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

[XStream] Custom Xstream driver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.5.0
    • None
    • None
    • Patch Available

    Description

      AbstractXStreamWrapper#createXStream uses hardcoded default XStream constructor. Such design makes impossible to set custom HierarchicalStreamDriver to the XStream instance.

      It would be nice to provide an ability to configure AbstractXStreamWrapper with optional HierarchicalStreamDriver instance.

      I created patch which adds AbstractXStreamWrapper#xstreamDriver property (+test).

      Patch also adds XML attribute 'driverRef' to Spring configuration (org.apache.camel.model.dataformat.XStreamDataFormat). However this new attribute of Spring DSL doesn't work because I got no idea how to wire existing Spring bean into the created dataFormat instance (since org.apache.camel.model.dataformat.XStreamDataFormat is Spring-unaware).

      Could somebody take a look at it, fix Spring DSL support and probably commit it to the codebase?

      Attachments

        1. xstream_custom_driver.patch
          5 kB
          Henryk Konsek

        Activity

          People

            njiang Willem Jiang
            hekonsek Henryk Konsek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: