log.tracef("Storing state to %s", file);
try {
FileOutputStream outputStream = null;
try {
outputStream = FOSAction.open(file);
SimpleDataOutput output = new SimpleDataOutput(Marshalling.createByteOutput(outputStream));
int version = this.passivationManager.getCurrentMarshallingVersion();
output.writeInt(version);
MarshallingConfiguration config = this.passivationManager.getMarshallingConfiguration(version);
Marshaller marshaller = this.marshallerFactory.createMarshaller(config);
marshaller.start(output);
try {
marshaller.writeObject(obj);