Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-3388

Http/https protocol uses Xstream for serializing commands in xml. Field additions to the commands bresks xtream serializacion between amq versions

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.1, 5.4.2, 5.5.0
    • Fix Version/s: 5.9.1, 5.10.0
    • Component/s: Transport
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Addition of fields in commands used between clients and brokers in newer amq versions breaks easily the http transport that uses xstream for xml serialization.

      To make xstream more tolerant to this changes between versions in org.apache.activemq.transport.xstream.XStreamWireFormat we could add the code below so xstream ignores unknown fields :

      // Implementation methods
      // -------------------------------------------------------------------------
      protected XStream createXStream() {
      // return new XStream();

      return new XStream() {

      protected MapperWrapper wrapMapper(MapperWrapper next) {
      return new MapperWrapper(next) {

      public boolean shouldSerializeMember(Class definedIn, String fieldName)

      { return definedIn != Object.class ? super.shouldSerializeMember(definedIn, fieldName) : false; }

      };
      }

      };

      }

        Attachments

        1. AMQ-3388.patch
          9 kB
          Marcel Casado

          Issue Links

            Activity

              People

              • Assignee:
                tabish Timothy A. Bish
                Reporter:
                marcelcasado Marcel Casado
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: