activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arthur Naseef (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-3388) Http/https protocol uses Xstream for serializing commands in xml. Field additions to the commands bresks xtream serializacion between amq versions
Date Sat, 07 Jun 2014 21:17:01 GMT

    [ https://issues.apache.org/jira/browse/AMQ-3388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14020975#comment-14020975
] 

Arthur Naseef commented on AMQ-3388:
------------------------------------

Git commit: https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=commit;h=5e5458ec38f7a204bb40174e13262c7b892de89b


> 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.4.1, 5.4.2, 5.5.0
>            Reporter: Marcel Casado
>            Assignee: Timothy Bish
>             Fix For: 5.9.1, 5.10.0
>
>         Attachments: AMQ-3388.patch
>
>
> 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;
>                     }
>                 };
>             }
>         };
>     }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message