Chapter 8. TreeCacheMarshaller
Rather than using standard Java serialization to serialize java.lang.reflect.Method objects and their parameters when remote caches talk to each other to replicate data, JBoss Cache uses its own mechanism to marshall and unmarshall data called the TreeCacheMarshaller.
In addition to providing the performance and efficiency enhancements over standard Java serialization, The TreeCacheMarshaller also performs one other function. In order to deserialize an object replicated to it from a remote cache, a cache instance needs to have access to the classloader that defines the object's class. This is simple if the cache's own classloader can access the required classes, but for situations where JBoss Cache is used as a service supporting clients that use different classloaders, the TreeCacheMarshaller can be configured to use different classloaders on a per-region basis by allowing application code to register a classloader that should be used to handle replication for a portion of the tree.