code: private void writeObject(ObjectOutputStream s) throws IOException {
          ObjectOutputStream.PutField putField = s.putFields();
          putField.put("version", version);
          putField.put("resourceAdapterKey", resourceAdapterKey);
          s.writeFields();
      }
docs: Overrides the default serialization.