users@jaxb.java.net

how to map jaxb to rdbms? Is anyone using hibernate?

From: Andy Davidson <andy_davidson_at_apple.com>
Date: Fri, 21 Jan 2011 11:49:26 -0800

Hi

I am building a service that exposes a XSD based interface to 3rd parties. The service implementation need to access an RDBMS. Any suggestions would be greatly appreciated.

 Our database engineer wants to use hibernate. His preferred way to use hibernate is to add annotation to our java classes. The idea of adding annotations to java classes generated by xjc seems like a bad idea. One approach is to create some sort of wrapper class that contains a jaxb version of the xsd complex types and a hibernate enabled version. This seem like a lot of extra coding. The nice aspect is that if the xsd changes, the java compiler will flag a lot of the required changes

Supposedly hibernate lets you specify the mapping between java and rdbms using an xml file. The advantage of this is it probably requires us to write less code, how ever requires more displine around change management. Given our project is just starting I expect we will have lots of xsd and rdbms level changes

are there other approaches we should consider?

thanks

Andy