0 Replies Latest reply on Jun 30, 2014 5:48 PM by Chris LeCompte

    jboss river marshaling - handling a renamed field

    Chris LeCompte Newbie

      I have a situation where some of the fields in a class have been renamed to remove underscores so that version 1.x can no longer talk to version 2.x of the server.  The serialization mechanism being used is river marshaling provided as part of the jboss marshaling 1.3.14 framework.  I have a work around for the issue but the more elegant solution would involve leveraging the framework itself to avoid modifying the class in question.  I can detect when I should use the old version of the class and then write out the old descriptors for the fields but I'm not sure where I should plug in to the framework to allow this to happen.  Essentially what I would like to happen is:


      detect version 1.x and write:


      class ClassA {





      detect version 2.x and write


      class ClassA {





      That way if the client is the new version the new descriptor gets written along with the data and if it's the old version then the old descriptor gets written without having to include the old version of the class (and performing some class loading magic).  Are there any examples on how to set/implement a ClassTable to do what I'm trying to do?  Thanks.