code: @Override
      public void writeRemoteObject(OutputStream out, @Sensitive Object obj) throws org.omg.CORBA.SystemException {
          WSUtilService service = WSUtilService.getInstance();
          if (service != null) {
              obj = service.replaceObject(obj);
          }
          super.writeRemoteObject(out, obj);
      }
docs: Overridden to allow objects to be replaced prior to being written.