docs: @Override
      public Object deserialize(byte[] idBytes) throws Exception
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          {
              Tr.entry(tc, "deserialize");
          }
  
          EJSContainer container = EJSContainer.getDefaultContainer();
          Object retObj = null;
          WrapperManager wm = container.getWrapperManager();
  
          // The first bytes of serialized data is a header and
          // the first byte of header identifies it as either a
          // BeanId or a WrapperId. So examine first byte to
          // determine whether it is a BeanId or a WrapperId.
          if (idBytes[0] == (byte) 0xAC)
          {
              // First byte indicates it is a BeanId. Use the
              // WrapperManager to find the wrapper in wrapper cache.
              ByteArray byteArray = new ByteArray(idBytes);
              BeanId beanId = BeanId.getBeanId(byteArray, container);
              retObj = wm.getWrapper(beanId).getLocalObject();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              {
                  Tr.debug(tc, "deserialized a BeanId = " + beanId
                               + ", component wrapper = " + retObj);
              }
          }
          else if (idBytes[0] == (byte) 0xAD) //d458325
          {
              // First byte indicates it is a WrapperId that was serialized.
              // Recreate the WrapperId and use it to create the wrapper
              // for the business interface in the WrapperId represents.
              WrapperId wrapperId = new WrapperId(idBytes);
              int index = wrapperId.ivInterfaceIndex;
              String interfaceName = wrapperId.ivInterfaceClassName;
              ByteArray byteArray = wrapperId.getBeanIdArray();
              BeanId beanId = BeanId.getBeanId(byteArray, container);
              BeanMetaData bmd = beanId.getBeanMetaData();
              Tr.debug(tc, "deserialized a WrapperId for BeanId = " + beanId
                           + ", primary key = " + beanId.getPrimaryKey());
  
              // Wrapper may be an Aggregate Local, Business Local or Business
              // Remote. Aggregate Local is easy to determine, otherwise assume
              // it is Business Local and finally resort to Business Remote last;
              // creating the wrapper based on type.                       F743-34304
              if (index == EJSWrapperBase.AGGREGATE_LOCAL_INDEX)
              {
                  // Obtain the home and create the 'set' of wrappers for the
                  // deserialized BeanId and then get the aggregate wrapper.
                  EJSHome home = bmd.getHome();
                  EJSWrapperCommon wc = home.internalCreateWrapper(beanId);
                  retObj = wc.getAggregateLocalWrapper();
              }
              else
              {
                  // Assume it is a BusinessLocalWrapper.
                  // Verify index is still valid. If we fail over to a new server,
                  // the index for the interface may be different than original server.
                  // In that case, we need to determine the new index.
                  Class<?>[] bInterfaces = bmd.ivBusinessLocalInterfaceClasses;
                  int numberOfLocalInterfaces = bInterfaces.length;
                  String wrapperInterfaceName = null;
                  if (index < numberOfLocalInterfaces)
                  {
                      wrapperInterfaceName = bInterfaces[index].getName();
                  }
  
                  // Is the BusinessLocalWrapper for the correct interface name?
                  if ((wrapperInterfaceName == null) || (!wrapperInterfaceName.equals(interfaceName)))
                  {
                      // Nope, index must be invalid, so we need to get an updated index
                      // that matches the desired interface name.
                      // Fix up the WrapperId with index that matches this server.
                      index = bmd.getRequiredLocalBusinessInterfaceIndex(interfaceName);
                  }
  
                  // Yep, create a new instance of the BusinessLocalWrapper object.
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  {
                      Tr.debug(tc, "deserialized a BusinessLocalWrapper, WrapperId = " + wrapperId);
                  }
                  EJSHome home = bmd.getHome();
                  EJSWrapperCommon wc = home.internalCreateWrapper(beanId);
  
                  retObj = wc.getLocalBusinessObject(index);
              }
          }
          else
          {
              throw new IOException("First byte of header not recognized");
          }
  
          // Return the wrapper
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          {
              Tr.exit(tc, "deserialize returning: " + retObj);
          }
          return retObj;
      }