docs: public EJSRemoteWrapper keyToObject(byte[] key)
                      throws RemoteException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "keyToObject");
  
          EJSWrapperCommon wc = null;
          EJSRemoteWrapper wrapper = null;
  
          // -----------------------------------------------------------------------
          // The key into the wrapper cache is the serialized beanId, and the
          // serialized beanId either is the wrapper key, or at least part of
          // the wrapper key.  For the EJB Component interface (i.e. EJB 2.1),
          // where there is only one remote interface, the wrapper key is the
          // beanId. However, for EJB 3.0 Business interfaces, where there may
          // be multiple remote interfaces, the wrapper key also contains the
          // identity of the specific interface.
          // -----------------------------------------------------------------------
  
          try
          {
              // If this is a Business Wrapper Key, extract the serialized beanId
              // from it, and use that to find the Common/Factory in the Wrapper
              // Cache, then use the rest of the Wrapper Key information to get
              // the specific remote interface wrapper.                       d419704
              if (key[0] == (byte) 0xAD)
              {
                  WrapperId wrapperId = new WrapperId(key);
                  ByteArray wrapperKey = wrapperId.getBeanIdArray();
                  wc = (EJSWrapperCommon) wrapperCache.findAndFault(wrapperKey);
                  if (wc != null)
                  {
                      wrapper = wc.getRemoteBusinessWrapper(wrapperId);
  
                      // At this point, all BeanIds are known to have the serialized
                      // byte array cached, so put Stateful and Entity BeanIds in the
                      // BeanId Cache.  BeanIds for homes, stateless, and messagedriven
                      // are singletons and already cached on EJSHome.                 d154342.1
                      BeanId beanId = wrapper.beanId; // d464515
                      if (!beanId._isHome && beanId.pkey != null) // d464515
                      {
                          beanIdCache.add(beanId); // d464515
                      }
                  }
              }
  
              // If this is a Component Wrapper Key, then it already is the
              // serialized beanId, so just use it to find the Common/Factory in
              // the Wrapper Cache, then get the one remote wrapper.          d419704
              else
              {
                  ByteArray wrapperKey = new ByteArray(key);
                  wc = (EJSWrapperCommon) wrapperCache.findAndFault(wrapperKey); // f111627
                  if (wc != null)
                  {
                      wrapper = wc.getRemoteObjectWrapper(); // d112375 d440604
  
                      // At this point, all BeanIds are known to have the serialized
                      // byte array cached, so put Stateful and Entity BeanIds in the
                      // BeanId Cache.  BeanIds for homes, stateless, and messagedriven
                      // are singletons and already cached on EJSHome.                 d154342.1
                      BeanId beanId = wrapper.beanId; // d464515
                      if (!beanId._isHome && beanId.pkey != null) // d464515
                      {
                          beanIdCache.add(beanId); // d464515
                      }
                  }
  
              }
          } catch (FaultException ex)
          {
              FFDCFilter.processException(ex, CLASS_NAME + ".keyToObject", "501", this);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                  Tr.event(tc, "Unable to fault in wrapper", ex);
              throw new RemoteException(ex.getMessage(), ex); // d356676.1
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "keyToObject", wrapper);
          return wrapper;
  
      }