Hi all,

There is a significant issue that we are concerned with here regarding the
XML instances that are ultimately created from the marshalling framework and
I have not seen it discussed on this list.  The issue is version control.

For example if I start with SchemaA.xsd and generate java objects from it, I
can now create and store XML instances in files.  But what happens when I
deploy this version and months later I extend SchemA.xsd by creating
SchemaB.xsd.  Let's assume that SchemaB just adds some fields to the
existing java classes.  Now what happens when I try to marshall an older XML
instance with classes generated from SchemaB?  

A similar issue concerns serialization.  The java serialization mechanism
will not allow you to serialize older persistant objects with newer versions
of the same class.  One way to evercome this is to set a varialble in the
class as follows:

protected static final long serialVersionUID = <some number>;

This static variable would be the same across old and new classes generated
by Castor.  So, the question is, how can we set a static variable like this
in generated code.

I have been a proponent of using Castor in many ways with my development
team, but this issue is the main obstacle that keep my other team members
from adopting Castor.

Has anyone implemented frameworks to handle version issues like these?  Any
help would be appreciated.

Bob.

======================================
Robert Ollila
Software Engineer
Vina Technologies
25 Manchester Street
Merrimack, NH 03054
603-589-0669
======================================

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to