You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by "Boring, Jeff W (N-Viper)" <je...@lmco.com> on 2008/01/03 15:43:16 UTC
RE: Combining JPA and Jaxb
Found an article that discusses how to do this (at the end), although
it's not OpenJPA specific.
http://www.devx.com/Java/Article/34069
Jeff W Boring
-----Original Message-----
From: Boring, Jeff W (N-Viper)
Sent: Friday, December 21, 2007 11:14 AM
To: users@openjpa.apache.org
Subject: RE: Combining JPA and Jaxb
Yes, I just found out (new to project) that is what we do. We have a
HUGE graph of subassemblies that we manually marshal from JPA to JaxB -
very ugly and slow. Has to be a better way and I think 1.0.1's XML
column mapping is the answer. But the manual is very thin here.
Jeff
Jeff W Boring
JSF ALIS DM
Lockheed Martin
-----Original Message-----
From: Ognjen Blagojevic [mailto:ognjen@etf.bg.ac.yu]
Sent: Friday, December 21, 2007 10:43 AM
To: users@openjpa.apache.org
Subject: Re: Combining JPA and Jaxb
Boring, Jeff W (N-Viper) wrote:
> Is it possible to use the same class for JPA and JaxB? We have a large
> graph and I'd hate to instantiate 2 object graphs. Is this what the
XML
> column mapping is for? Sorry, I'm new to JPA and JaxB and just need
some
> basic information. Is there any other documentation about this other
> than the section in the user manual on the XML column mapping?
I would like to know that myself. In my company we generate two object
graphs and use utility methods to copy data between JPA and JAXB POJOs.
Regards,
Ognjen
Re: Combining JPA and Jaxb
Posted by Vitor Rodrigues <va...@gmail.com>.
I have been able to persist XML data as an XML Column using OpenJPA + JAXB.
At the application level, I work with regular POJOs and when I call
em.persist(), these objects are persisted into XML columns. You can also
marshal these POJOs to regular XML files.
Let me know if that is what you are trying to achieve. I did some of trial
and error until I got it to work, but can help you with what I know.
Regards,
Vitor
On Jan 3, 2008 6:43 AM, Boring, Jeff W (N-Viper) <je...@lmco.com>
wrote:
> Found an article that discusses how to do this (at the end), although
> it's not OpenJPA specific.
>
> http://www.devx.com/Java/Article/34069
>
> Jeff W Boring
>
> -----Original Message-----
> From: Boring, Jeff W (N-Viper)
> Sent: Friday, December 21, 2007 11:14 AM
> To: users@openjpa.apache.org
> Subject: RE: Combining JPA and Jaxb
>
> Yes, I just found out (new to project) that is what we do. We have a
> HUGE graph of subassemblies that we manually marshal from JPA to JaxB -
> very ugly and slow. Has to be a better way and I think 1.0.1's XML
> column mapping is the answer. But the manual is very thin here.
>
> Jeff
>
> Jeff W Boring
> JSF ALIS DM
> Lockheed Martin
>
> -----Original Message-----
> From: Ognjen Blagojevic [mailto:ognjen@etf.bg.ac.yu]
> Sent: Friday, December 21, 2007 10:43 AM
> To: users@openjpa.apache.org
> Subject: Re: Combining JPA and Jaxb
>
> Boring, Jeff W (N-Viper) wrote:
> > Is it possible to use the same class for JPA and JaxB? We have a large
> > graph and I'd hate to instantiate 2 object graphs. Is this what the
> XML
> > column mapping is for? Sorry, I'm new to JPA and JaxB and just need
> some
> > basic information. Is there any other documentation about this other
> > than the section in the user manual on the XML column mapping?
>
> I would like to know that myself. In my company we generate two object
> graphs and use utility methods to copy data between JPA and JAXB POJOs.
>
> Regards,
> Ognjen
>