title: What are the consequences of a JAXB object not implementing serializable?
body: <p>I am hoping someone could clarify this for me so that I can better understand how marshalling of JAXB objects work.</p>
  
  <p>From reading and looking at examples it is my understanding that a JAXB object must implement <code>java.io.Serializable</code> so that the object can be marshalled and unmarshalled correctly. The part that I am a bit unsure about is what happens (read: what are the consequences) when one of your JAXB objects do not implement serializable? This has happened in the past and results in errors in the log files similar to </p>
  
  <pre><code>ERROR [example.package.name.MyJaxbClass.data]DiskStorageFactory.call{503} | Disk Write of -309037891 failed: 
  java.io.NotSerializableException: example.package.name.myJaxbClass$MyNonSerializedElement
  </code></pre>
  
  <p>Yet the rest of the code seems to work fine. How important is it for your JAXB classes to implement serializable and what happens when they do not?</p>