We have sucesfully converted to JAXB based configuration reading and schema generation.

Along the way I noticed a few things that JAXB 2.x is missing, the most important in our case being:
No clear support for custom annotations and hooking up their processing into JAXB library
Annotation for xs:documentation i.e ability to generate xs:documentation elements in generated schema

Overall it was well worth the switch to JAXB annotations to map configuration class hierarchy to XML and thus achieve seamless XML configuration files reading into object model as well as automatic XML schema generation.


On 7/22/09 2:41 PM, Alexey Loubyansky wrote:
Sorry for the delayed response.

I quickly looked through the code. From pure Java/XML binding point, now 
that you looked a bit into the JAXB annotations, do you see something 
that you need but missing there?
JBossXB annotations based binding is based on JAXB2.0, although it has a 
number of its own annotations and features that allow to go a bit beyond 
the standard. But also JBossXB doesn't support everything in JAXB yet. 
Just because no one asked for it.

Another thing, JBossXB doesn't support marshalling for binding based on 
Java annotations. We also don't generate schemas and documentation.
So, if you decide to switch to JAXB/JBossXB annotations and decide to 
also write some tools like that, it would be great if you contributed 
them to JBossXB.


Alexey

Vladimir Blagojevic wrote:
  
On 7/17/09 5:16 PM, Bill Burke wrote:
    
Wouldn't it be better to write a javadoc-like generator that
introspected for JAXB and Inifispan annotations instead of writing your
own XML parser and schema generator?  Or maybe I'm misunderstanding your
post.

In other words, use JAXB for marshalling/unmarshalling/schema
generation.  Use inifinispan javadoc generator for documentation.
   
      
I looked around a bit more to see that now in JAXB 2.x we have 
annotations as well :) If we annotate our configuration beans with JAXB 
annotations I suppose we can do exactly what you suggest - use JAXB for 
marshalling/unmarshalling/schema generation and at the same time use 
those annotation in a custom tool that creates reference documentation.
    
By creating your own XML parsing you've just complicated the maintenance
problems for future maintainers of infinispan.
   
      
I agree.

Cheers,
Vladimir
_______________________________________________
jboss-development mailing list
jboss-development@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development
    
_______________________________________________
jboss-development mailing list
jboss-development@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development