Hi Dan, I never try this. I don't see any reason why it won't work, but if I may I would recommend you not to mix JPA annotations with JAxB ones. Just think about the future changes on your persistence model, are you going to amend your schema also? To me the prefered way is to separate those two concepts: one is the business model, the other the payload for soap messages. You can then map the payload to the business for persistence or everything you like. May be you're already aware of this, so...
Hope anyway that this contribute, cheers, Maj > Date: Mon, 19 Apr 2010 14:09:39 -0700 > From: [email protected] > To: [email protected] > Subject: Clarification on using JAX-RS with CXF > > > I'm unclear about the following and I'd appreciate help in resolving my > uncertainties. > > 1. Can/should entities that are marked with JPA annotations also be marked > with JAXB annotations for use as request/response objects? For example is > the following acceptable? > > @XmlRootElement(name="Category") > @Entity > @Table(name="category") > public class Category { ... } > > 2. When using HTTP centric clients, must the client have a copy of the > request/response objects. If yes, is there anyway around it? > > Thanks. > > -Dan > -- > View this message in context: > http://old.nabble.com/Clarification-on-using-JAX-RS-with-CXF-tp28287753p28287753.html > Sent from the cxf-user mailing list archive at Nabble.com. > _________________________________________________________________ Consultez gratuitement vos emails Orange, Gmail, Free, ... directement dans HOTMAIL ! http://www.windowslive.fr/hotmail/agregation/
