views:

71

answers:

2

I would like to use hibernate for persisting objects through web services and am thinking of using hyperjaxb3 with Apache CXF. Do you have any other suggestion for this purpose?

Edit: To clarify my question a little bit... I am using eclipse and wsgen, wsimport ant tasks to generate my service and client classes respectively. I am using annotations to configure entities which are persisted by hibernate. With this setting I encountered a few simple issues which I was able to fix by googling around. Then I encountered a problem with cyclic references which I fixed with afterUnmarshal (described here ). Afterwards I encountered a problem of entity with two parents (two bidirectional relationships) which I tried to solve with @XmlID and @XmlIDREF in the way described here but didn't make it in the end. And at that time I began to wonder if I am doing something wrong and should use different tools/technologies (should I maybe switch to maven, or introduce spring, etc.) so I investigated a little bit and found out about hyperjaxb3 and am wondering if that could be the solution to my problems? :)

Edit 2: In short, which way you use, prefer or just do in most cases involving these two?

A: 

Take a look the Spring MVC Tutorial, which you'd be able to integrate with Hibernate quite easily.

Noel M
+1  A: 

EclipseLink JAXB (MOXy) has extensions for handling JPA entities, for more information see:

Blaise Doughan