serialized objects 博客分类: JDK J2SESUNthreadHTML
程序员文章站
2024-02-27 22:47:03
...
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:
JavaWorld
Java Object Serialization Specification version 1.5.0
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:
JavaWorld
Java Object Serialization Specification version 1.5.0
推荐阅读
-
serialized objects 博客分类: JDK J2SESUNthreadHTML
-
Java class loader 博客分类: JDK JavaJVMUPCC++
-
当一个线程进入一个对象的一个synchronized方法后,其它线程是否可进入此对象的其它方法? 博客分类: JDK thread
-
正确使用 Volatile 变量 博客分类: JDK 多线程Bean应用服务器数据结构框架
-
当一个线程进入一个对象的一个synchronized方法后,其它线程是否可进入此对象的其它方法? 博客分类: JDK thread
-
serialized objects 博客分类: JDK J2SESUNthreadHTML
-
Java十年 十大人物 写在2005 博客分类: Java Java大众硬件SUN大众软件JDK
-
Java十年 十大人物 写在2005 博客分类: Java Java大众硬件SUN大众软件JDK
-
linux之jdk安装 博客分类: JavaLinux
-
JAX-WS 2.2 API与Java SE 6冲突的问题 博客分类: JAX-WS JAX-WS与JDK6冲突JAX-WSjavax.xml.ws.WebFault.messageName