Sad to hear there's no way around it.
I've tried JAXB RI with an extension called HyperJAXB2. The generated
classes implemented the hashCode method which called each other till
the stack overflowed (person.hashCode -> firm.hashCode ->
person.hashCode -> ...). The only exception was StackOverflowError.
BTW I know it's not the marshalling but the code generated by JAXB RI
AFAIK.
On 8/2/06, Ed Mooney <Ed.Mooney_at_sun.com> wrote:
> Hi Norbert,
>
> JAXB throws an exception when it detects a cycle. There's no way around
> it, that I know.
>
> Regards,
> --
> Ed Mooney |Sun Microsystems, Inc.|Time flies like
> Java Web Services |UBUR02-201 |an arrow, but
> Ed.Mooney_at_Sun.COM |1 Network Drive |fruit flies like
> 781-442-0459 |Burlington, MA 01803 |a banana. Groucho
>
> Csík Norbert wrote:
> > Hi!
> >
> > Can JAXB marshall an the following object structure, and if so then how?
> >
> > pers1.name = "John"
> > pers1.firm = firm1
> >
> > firm1.name = "ACME"
> > firm1.directorPerson = pers1
> >
> > marshal(pers1)
> >
> > Thanks,
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
--
Norbert Csík