Serialization is a process of transforming a object definition into a persistent format (where the format is platform specific). Objects transferred across network (RMI, EJBs) need to be serializable. SOAP requests are xml based, and JAXB is used to marshall and unmarshall the objects <—> xml. I am prompted by the code-quality plugins to add a SerialVersionUID. Is this required? Do CXF/JAXB internally need this?
Serialization is a process of transforming a object definition into a persistent format (where
Share
JAXB does not need it, as far as I know. You get this warning because your classes implement
Serializable, but JAXB doesn’t require your classes to beSerializable.If there’s no other reason why your classes need to be
Serializable, you could just change them so that they don’t implementSerializable.Your classes only need to implement
Serializableif you want to be able to serialize/deserialize them using Java’s default serialization mechanism (which is used by, for example, RMI).