code: @Override
      public int getLockMode(Object lockName)
      {
          BeanId beanId = (BeanId) lockName;
  
          // When the number of bean instances is limited, a lock will be
          // obtained for the home bean id to block creation of additional
          // instances... this is an EXCLUSIVE lock.                         PK20648
          if (beanId.isHome())
          {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                  Tr.event(tc, "getLockMode: locking home bean: EXCLUSIVE");
              return LockManager.EXCLUSIVE;
          }
  
          EntityBeanO beanO = null;
  
          beanO = (EntityBeanO) ivContainer.activator.getBean(this, beanId);
  
          if (beanO == null) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) // d144064
                  Tr.event(tc, "getLockMode: failed to get bean");
              return LockManager.EXCLUSIVE;
          }
  
          return beanO.getLockMode();
  
      }
docs: Return the lock mode for the given lock. The lock name is the
  bean id of a bean enlisted with this transaction. <p>
  
  To satisfy this request, find the EntityBeanO in this transaction
  associated with the given bean id and delegate the call to it. <p>
  
  Do not try to activate bean here, this transaction may already have
  been enlisted by a beanO. The beanO should be active in this
  situation. Problems will arise if the activation tries to reenlist
  in this transaction since its state is unknown.
  
  This call is made when the lock needs to be upgraded from a proxy
  to a full Lock object. At that point a determination needs to be
  made on the locking mode of the holder of the proxy lock. No
  assumptions can be made on the holder's state.