users@jaxb.java.net

Re: Validator finds cycles where there are none?

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 28 Jul 2004 09:10:28 -0700

> There are many cases where the same object can validly appear in a
> object graph. The most obvious is reusing a String.

Right. I should have mentioned that immutable leaf nodes are OK to
appear more than once. Like java.lang.String, or the generated type-safe
enums.

> Now this does present a problem when unmarshalling, since the class does
> not have a public constructor. You would need specialized code to
> unmarshal the XML objects back into the valid instances of the class.

With leaf nodes, we can handle all those correctly. Just to remind you,
we already support the type-safe enum pattern.

I believe the case discussed here is using the same JAXB-generated bean
more than once in the object graph.

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net