docs: protected void lock(TransactionLock newTransactionLock)
                      throws ObjectManagerException {
          final String methodName = "lock";
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this, cclass, methodName, newTransactionLock);
  
          // Already locked to the requesting Transaction?
          while (transactionLock != newTransactionLock) {
  
              synchronized (this) {
                  if (!transactionLock.isLocked()) {
                      setState(nextStateForLock); // Make the state change. 
                      // Not yet part of a transaction. 
                      transactionLock = newTransactionLock;
                      // Create the before immage. 
                      try {
                          // TODO Don't realy need this if we are stateAdded
                          beforeImmage = (ManagedObject) this.clone();
                      } catch (java.lang.CloneNotSupportedException exception) {
                          // No FFDC Code Needed.
                          ObjectManager.ffdc.processException(this, cclass, "lock", exception, "1:807:1.34");
                          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                              trace.exit(this, cclass, methodName, exception);
                          throw new UnexpectedExceptionException(this, exception);
                      } // catch CloneNotSupportedException.
                  } else if (transactionLock == newTransactionLock) {
                      // Do nothing another thread got the lock after we passed the while() above
                      // but before we hit the synchronized block. 
                  } else {
                      // Already part of another transaction.
                      // throw new AlreadyLockedException(this
                      //                                 );
                      threadsWaitingForLock++; // Count the waiting threads.
                      try {
                          if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                              trace.debug(this, cclass, methodName, new Object[] { "About to wait()",
                                                                                  transactionLock.getLockingTransaction(),
                                                                                  new Integer(threadsWaitingForLock) });
                          wait();
  
                      } catch (InterruptedException exception) {
                          // No FFDC Code Needed.
                          ObjectManager.ffdc.processException(this, cclass, "lock", exception, "1:829:1.34");
                          threadsWaitingForLock--; // Count the waiting threads. 
                          // Just bail out without taking the lock. 
                          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                              trace.exit(this
                                         , cclass
                                         , methodName
                                         , exception);
                          throw new UnexpectedExceptionException(this
                                                                 , exception);
                      } // catch (InterruptedException...
                      threadsWaitingForLock--; // Count the waiting threads. 
                  } // if ( transactionLock == null...
              } // synchronized(this).  
          } // while (lockingTransaction != internalTransaction).
  
          numberOfLocksTaken++;
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this,
                         cclass,
                         methodName);
      }