if (rmiOnewayMarshalling)
{
// Legacy treatment, pre 2.4.0
ByteArrayOutputStream baos = new ByteArrayOutputStream();
SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
ObjectOutputStream oos = manager.createOutput(baos);
writeObject(oos, payload);
oos.flush();
oos.close();
is = new ByteArrayInputStream(baos.toByteArray());
}