users@jaxb.java.net

Re: Delegation and binding

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 12 Feb 2003 11:52:00 -0800

> BTW PRIMARY_INTERFACE_CLASS is declared as final. If it was mutable,
> we might be able to customize unmarshaller to subclass at runtime. Can that restriction be removed?

Unfortunately PRIMARY_INTERFACE_CLASS is not only final but also static.

As you probably know, the issue of adding behavior to the generated code
is really non-trivial, even if you are willing to become dependent to RI.

I personally don't think it's a good idea to use JAXB to replace your
domain object model. You should have nicely cleanly designed domain
object model at the heart of your application and you should use JAXB
just as a type-safe vocabulary-friendly parser.

That said, I think the easiest short-term RI-specific solution is to
make it possible to subclass RI-generated class. The long-term solution
should be something implementation agnostic, but not sure how it looks
like.


regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com