users@jaxb.java.net

Re: JAXException

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Wed, 05 Feb 2003 11:31:27 -0500

Harry Greijer wrote:
> Hi.
>
> I'm working in a enviroment where everything is Serializable.
> We use the Command pattern.
> I'm doing some test using JAXB for generating xmls. Great Technic!
> But all my commands implements Serializable.
> I did a hack that added Serializable to all value objects generated by
> jaxb.
> But it was not good enough because JAXException did not.
>

Hi,

I'm not sure exactly what problem you are seeing. JAXBException extends
java.lang.Exception, which implements java.io.Serializable. In fact, this:

        ( JAXBException.class instanceof java.io.Serializable )

returns true, as expected.

> Is there any problems for you to add this Serializable to all classes in
> the framwork to?
>
> If anybody whats my "Serializable" hack let me know (Its not a beauty but
> it works).
>

The 1.0 FCS release will contain a customization that causes the binding
compiler to generate serializable classes, so hopefully you won't need to
use your hack much longer.

--Ryan

> /Hagge
>