users@jaxb.java.net

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

From: Kiran Narasareddy <kiran.narasareddy_at_gmail.com>
Date: Sat, 22 Jan 2011 06:19:39 +0530

Hi,
Have a look at Hyperjaxb3 (
http://confluence.highsource.org/display/HJ3/Home ) by Aleksei.
Hyperjaxb3 is an open source project which provides relational persistence
for JAXB objects.

It is an Xjc extension which annotates your java class with JPA annotations,

It's been made fairly simple and every time you build your XSD, you don't
have to worry about the changes.
I have been using it for the past 1.5 year (started with hyperjaxb1, 2 n
then finally moved on to 3) and am very happy with it.

Thanks Aleksei.

Regards
Kiran Narasareddy

Sent from my HTC
On 22-Jan-2011 1:19 AM, "Andy Davidson" <andy_davidson_at_apple.com> wrote:
> 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