Http/https protocol uses Xstream for serializing commands in xml. Field
additions to the commands bresks xtream serializacion between amq versions
---------------------------------------------------------------------------------------------------------------------------------------------------
Key: AMQ-3388
URL: https://issues.apache.org/jira/browse/AMQ-3388
Project: ActiveMQ
Issue Type: Improvement
Components: Transport
Affects Versions: 5.5.0, 5.4.2, 5.4.1
Reporter: Marcel Casado
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.
The make xstream more tolerant to this changes between version 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;
}
};
}
};
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira