Chapter 8. Serialization

Serialization - how it works within remoting: In general, remoting will rely on a factory to provide the serialization implementation, or org.jboss.remoting.serialization.SerializationManager, to be used when doing object serialization. This factory is org.jboss.remoting.serialization.SerializationStreamFactory and is a (as defined by its javadoc):

factory is for defining the Object stream implemenations to be used along with creating those implemenations for use.
The main function will be to return instance of ObjectOutput and ObjectInput.  By default, the implementations will be 
java.io.ObjectOutputStream and java.io.ObjectInputStream.

Currently there are only two different types of serialization implementations; 'java' and 'jboss'. The 'java' type uses org.jboss.remoting.serialization.impl.java.JavaSerializationManager as the SerializationManager implementation and is backed by standard Java serialization provide by the JVM, which is the default. The 'jboss' type uses org.jboss.remoting.serialization.impl.jboss.JBossSerializationManager as the SerializationManager implementation and is backed by JBoss Serialization.

JBoss Serialization is a new project under development to provide a more performant implementation of object serialization. It complies with java serialization standard with three exceptions:

- SerialUID not needed

- java.io.Serializable is not required

- different protocol

JBoss Serialization requires JDK 1.5

It is possible to override the default SerializationManger implementation to be used by setting the system property 'SERIALIZATION' to the fully qualified name of the class to use (which will need to provide a void constructor).