Make ClassMarshaller thread safe