code: private void writeObject(java.io.ObjectOutputStream out) throws IOException
      {
          out.defaultWriteObject();
  
          // Write out header information first.
          out.write(EYECATCHER);
          out.writeShort(PLATFORM);
          out.writeShort(ivActualVersion);
  
          // Now write EJBObject to output stream using HandleDelegate object.
          HandleHelper.lookupHandleDelegate().writeEJBObject(ivEjbObject, out);
  
          // If actual version is 1, then we need to write HomeHandle and key
          // to output stream as well.
          if (ivActualVersion == Constants.HANDLE_V1)
          {
              out.writeObject(ivHomeHandle);
  
              //d158086---------------->
  
              // if this is the IBM IIOP class or we have no IIOP class
              // which means we are not running in an ibm environment
              // we leave the key as is.  this allows older handle versions
              // running on ibm thin client or client containers, to still function
  
              Boolean orb = HandleHelper.isORBOutputStream(out);
              if (orb != null && orb.booleanValue())
              {
  
                  if (DEBUG_ON)
                      System.out.println("serialize IIOP stream primary key");
                  out.writeObject(ivKey);
                  if (DEBUG_ON)
                      System.out.println("serialized IIOP stream primary key");
              }
              else
              {
                  if (DEBUG_ON)
                      System.out.println("serialize non IIOP stream primary key");
                  out.writeObject(KeyHelper.serialize(ivKey));
                  if (DEBUG_ON)
                      System.out.println("serialized non IIOP stream primary key");
  
              }
              //<----------------d158086
  
          }
      }
docs: p113380 - rewrote entire method for product interoperability.