[jboss-dev] JAXB Generated Classes with target 2.0
Anil Saldhana
Anil.Saldhana at redhat.com
Wed Jul 25 01:10:50 EDT 2007
Jason, doesn't the ObjectFactory also have QNames that are tied to a
particular name space?
Something along the lines of:
-------------
@XmlRegistry
public class ObjectFactory {
private final static QName _Policy_QNAME = new
QName("urn:jboss:security-config:5.0", "policy");
private final static QName _IdentityTrust_QNAME = new
QName("urn:jboss:security-config:5.0", "identity-trust");
-------------------------------
I think the schema evolution issue is not well addressed by JAXB2
(Adrian's point). If I have to do JAXB2 for security configuration
(login-config.xml), then I will have to generate multiple object classes
(for schema versions - 4.0, 4.1 and 5.0).
Jason T. Greene wrote:
> Adrian wrote:
>> On Tue, 2007-07-24 at 13:28 -0500, Jason T. Greene wrote:
>>> As to compatibility on schema updates, if you change the schema in a
>>> backwards compatible way its not a problem.
>>
>> You mean like changing the schema namespace from j2ee to javaee. ;-)
>
> Yeah, for that you would have to either regenerate classes, or
> alternatively change the annotations on all classes that refer to it.
>
> If you want something more dynamic, the Sun implementation does allow
> you to write your own "AnnotationReader", but this is not in the spec.
>
--
Anil Saldhana
Project/Technical Lead,
JBoss Security & Identity Management
JBoss, A division of Red Hat Inc.
http://labs.jboss.com/portal/jbosssecurity/
More information about the jboss-development
mailing list