users@jersey.java.net

Re: [Jersey] Re: Does Jersey support jaxb external customization?

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Wed, 28 Jul 2010 10:59:21 +0200

This would need to create some kind of fake classloader, which would
provide annotations from external location, like a file..

.. unfortunately, I don't know about any project which can do this, JAXB
nor Jersey don't support anything like it by itself. You should probably
re-generate your JAXB beans (it should be simple if you have XSD schema)
or implement custom classloader (but it might not be easy task).

Regards,
Pavel

On 7/23/10 5:06 PM, Bo Xu wrote:
> Hi Pavel,
> Thanks for your reply and sorry the question I asked is vague.
> My aim:
> I have a Java lib project (let's call it A) which takes care of biz logic
> and also includes all JAXB beans.
> I also have another project (let's call it B) that calls methods in project
> A( the method output is always JAXB beans) and handles Restful Web Services.
> It is basically a thin wrap of the Java lib.
> Now I am building the third project (let's call it C) which requires a
> slightly different set of xml/json output. So the idea solution for me is to
> not have all JAXB annotations embedded in the JAXB bean code but in an
> external file shipped with project B or C.
> Any suggestions?
>