How to deal with a Java serialized object whose package changed?

后端 未结 4 933
礼貌的吻别
礼貌的吻别 2020-12-30 02:38

I have a Java class that is stored in an HttpSession object that\'s serialized and transfered between servers in a cluster environment. For the purpose of this explanation,

4条回答
  •  [愿得一人]
    2020-12-30 02:56

    This is always a big headache with Java serialization. As long as you're migrating your classes anyway, I'd recommend looking into migrating toward a different serialization mechanism like XStream. There's an interesting article on this at JavaLobby.

提交回复
热议问题