serialized objects

serialized objectsThisstartedagain…athreadfrom*****:WhatdoyouconsiderabestpracticeforserialVersionUID?T______________________________________________From:*******Sent:Thursday,Nov…

大家好,又见面了,我是你们的朋友全栈君。This started again… a thread from *****:

What do you consider a best practice for serialVersionUID?

T

______________________________________________

From: *******

Sent: Thursday, November 15, 2007 10:45 AM

To: *******

Cc: *******

Subject: serilaVersionUID

Hi, *****, I realized that you changed the servialVersionUID in 11 TOs and make them unique. What is the purpose to make them unique?

Once the serilaVersionUID in TO is modified, both BPM and rule engine has to be deployed again. Now Dev rule engine is broken, and I am afraid Dev BPM (if it is running) also need redeploy.

*******

So after doing research again here is what I (*****) thinks:

The purpose of the serialVersionUID is to give the developer the control of when a class is compatible with previous versions and when not.

The consequence of this is that when the class changes, the developer needs to check that if the new class has compatible changes with previous versions, then keep the same number, if changes are not compatible, then change the number.

you can use the command: serialver to generate a serial version uid.

Articles:

[url=http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-control.html?page=1]JavaWorld[/url]

[url=http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/class.html#5421]Java Object Serialization Specification version 1.5.0[/url]

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/148527.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • hql查询语句用法详解_sql add语句

    hql查询语句用法详解_sql add语句HQL的语法比较简单,与普通SQL的区别之处是针对对象的不同,在查询语句中将sql中的表名替换成了sql中的持久化类名,因为hibernate机制是基于对象进行查询的。 不带参数的查询,语句是“fromPOJO”的形式,其中POJO即为持久化类名称Queryquery=session.createQuery("fromUser");带参数的查询接口Query提供了…

    2022年9月29日
    3
  • POJ 3630 Phone List

    POJ 3630 Phone List

    2022年1月18日
    66
  • java多线程–同步锁、

    java多线程–同步锁、同步代码块:语法:synchronized(同步锁){     需要同步操作的代码}—————————————————同步锁:为了保证每个线程都能正常执行原子操作,Java引入了线程同步机制.同步监听对象/同步锁/同步监听器/互斥锁:对象的同步锁只是一个概念,可以想象为在对象上标记了一个锁….

    2022年6月13日
    29
  • 阿里云服务器 – mysql 链接

    阿里云服务器 – mysql 链接

    2020年11月19日
    186
  • bs与cs架构的优缺点_bs架构与cs架构的区别详细讲解

    bs与cs架构的优缺点_bs架构与cs架构的区别详细讲解简介C/S又称Client/Server或客户/服务器模式。服务器通常采用高性能的PC、工作站或小型机,并采用大型数据库系统,如Oracle、Sybase、Informix或SQLServer。客户端需要安装专用的客户端软件。B/S是Brower/Server的缩写,客户机上只要安装一个浏览器(Browser),如NetscapeNavigator或InternetExplorer,服务器安装Oracle、Sybase、Informix或SQLServer等数据库。浏览器通过Web

    2022年8月31日
    5
  • Spring返回text/plain出现中文乱码

    Spring返回text/plain出现中文乱码今天在RestTemplate调试的时候发现返回的中文出现了乱码,使用POST

    2022年7月15日
    18

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号