users@jaxb.java.net

Re: injecting JAXB annotations at runtime

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Tue, 09 Dec 2008 12:24:55 -0700

Wolfgang Laun wrote:
> On Tue, Dec 9, 2008 at 6:56 PM, Arul Dhesiaseelan <arul_at_fluxcorp.com
> <mailto:arul_at_fluxcorp.com>> wrote:
>
> Hi,
>
> I am trying to annotate a class with @XmlRootElement at runtime.
>
>
Some of the classes input to our application comes from the client and
we can't enforce client to add JAXB annotations. We want to use JAXB to
persist these objects, so we need these classes to be JAXB annotated at
runtime. I agree there could be diff approaches. Just wanted to check
experts input.
>
> Although I may not be able to help you with this caper I'd still like
> to know why this has to be at runtime. There might be an altogether
> different approach, or can you exclude that?
>
>
>
> AFAIK, I can't use the JAXB introductions because it needs an
> external static configuration file.
>
> I can think of using javaassist to manipulate the class file at
> runtime. But, I wanted to check here if there is a better
> alternative to do this with any other tools or does JAXB RI
> provides any hooks to do this.
>
> -Arul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> <mailto:users-unsubscribe_at_jaxb.dev.java.net>
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> <mailto:users-help_at_jaxb.dev.java.net>
>
>