code: public void preOptimisticReplace(Transaction transaction)
                      throws ObjectManagerException
      {
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this
                          , cclass
                          , "preOptimisticReplace"
                          , new Object[] { transaction }
                              );
  
          testState(nextStateForOptimisticReplace); // Test the state change.
          // Bump the updateSequence to indicate the current version of the ManagedObject.
          // The caller must have synchronized on a lock on some Object to protect the 
          // ManagedObject from change while we serialize it. 
          // The updateSequence is only meaningful while that lock is held.
          updateSequence++;
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this,
                         cclass,
                         "preOptimisticReplace");
      }
docs: Driven when the object is optimistically replaced in an object store within a transaction. This differs from a
  standard replace in that the ManagedObject need not be locked. There is no before immage taken and it is up to the
  user of the optimisticReplace to perform any compensating action should the transaction back out. The after image
  has not been captured so the ManagedObject can still be changed.
  
  A subclass may override this method to do its own optimisticReplace processing before the log has been written.
  
  @param transaction controling the replacement.
  @throws ObjectManagerException