[weld-dev] Wire Compatibility

Pete Muir pmuir at redhat.com
Wed Jul 7 23:07:29 EDT 2010


Hi Andy

I suspect this is more useful for our end users, as we don't provide any serialization services in Weld - they are either provided by the user who implements serializable, or by the EJB container.

Could you make this into a FAQ on seamframework.org?

Thanks!

On 28 Jun 2010, at 07:18, Andrew Lee Rubinger wrote:

> Hey guys:
> 
> Had a good talk w/ Dan and Lincoln at the conclusion of JBossWorld 
> regarding wire compatibility and was asked to pass references along to 
> this list.
> 
> The key is that marking a class as "implements Serializable" isn't 
> sufficient to:
> 
> 1) Make it really Serializable
> 2) Ensure that the wire protocol maintains compatibility across releases
> 
> I've been using a technique documented by Bob Lee awhile back:
> 
> http://crazybob.org/2006/01/unit-testing-serialization-evolution_13.html
> 
> The idea is that after you've formalized your protocol (ie. 
> Externalizable or readObject/writeObject explicitly), you make a copy of 
> this original class.  Then, using a special ObjectOutputStream, you can 
> redefine this class as a new name, hence converting from old to new or 
> new to old.
> 
> For instance, I implement this here in ShrinkWrap to make Archives 
> Serializable:
> 
> http://anonsvn.jboss.org/repos/common/shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/serialization/SerializationTestCase.java
> 
> Recommend this approach, or one similar.  Some folks like to serialize 
> the original version into a .ser file which stays in SCM, and ends up 
> being the basis for the test point.  But that can only test compat in 
> one direction.
> 
> S,
> ALR
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev




More information about the weld-dev mailing list