At this moment, the read/write delegation is based on two keys: the XML
QName for the read and the Java type for the write. Maybe we could unify the
two using the QName as follows:
1) Add an xmlName (QName) atttribute to the Base model (or define another
interface such as XMLBase). The namespace of the xmlName naturally
represents the version of the model.
2) Adjust the model write code to understand the XML name.
Thanks,
Raymond
--------------------------------------------------
From: "Luciano Resende" <[email protected]>
Sent: Tuesday, March 10, 2009 8:28 AM
To: <[email protected]>
Subject: Re: [2.x] [DISCUSS] Backward compatibility
On Tue, Mar 10, 2009 at 3:40 AM, Simon Laws <[email protected]>
wrote:
2) The "write" of the model is based on the Java type of the model. We
now have two processors registered against the same java type, one from
assembly-xml-osoa and the other from assembly-xml. They compete for the
same model and produce different behaviors depending who overrides the
other one.
I think we need to record the version of the spec for the composite
that was used to populate the model and then use this to find the
appropriate processor for writing. Having the spec version available
will likely be useful later on in processing the model also. If no one
objects I'll add a spec version field to the composite model object.
This would involve much more then just adding the spec version field,
as currently we register processors by model (e.g Composite.class) and
we will have to change all the processor registration/lookup
algorithms as well if we go this path.
Simon
--
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/