docs: @Override
      public Object getObjectInstance(JavaColonNamespace namespace, String name) throws NamingException {
  
          Object objectInstance = null;
  
          // java:app and java:global are the only namespaces that we could expect to find when
          // checking the server, so we'll only check those:
          if (JavaColonNamespace.APP.equals(namespace) || JavaColonNamespace.GLOBAL.equals(namespace)) {
              // ok, so either we have never looked it up before, or if we did it wasn't cacheable
              // so we must do the lookup on the server
              ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
              J2EEName j2eeName = cmd.getJ2EEName();
              RemoteObjectInstance roi = null;
              try {
                  ClientSupport jndiHelper = clientSupportFactory.getRemoteClientSupport();
                  roi = jndiHelper.getRemoteObjectInstance(j2eeName.getApplication(), j2eeName.getModule(), j2eeName.getComponent(), namespace.toString(), name);
              } catch (RemoteException ex) {
                  //ffdc
                  throw new NamingException("Failed remote lookup of " + namespace.prefix() + name);
              }
  
              if (roi != null) {
                  try {
                      objectInstance = roi.getObject();
                      if (roi instanceof RemoteReferenceObjectInstanceImpl) {
                          // need to deserialize remote object byte array into javax.naming.Reference and re-construct
                          ObjectInputStream ois = null;
                          try {
                              byte[] bytes = (byte[]) objectInstance;
                              ClassLoader classLoader = AccessController.doPrivileged(new GetCL("this"));
                              DeserializationContext dc = serializationService.createDeserializationContext();
                              ois = dc.createObjectInputStream(new ByteArrayInputStream(bytes), classLoader);
                              objectInstance = ois.readObject();
  
                              if (objectInstance == null || !(objectInstance instanceof javax.naming.Reference)) {
                                  throw new NamingException("Invalid reference returned from server");
                              }
                              javax.naming.Reference ref = (javax.naming.Reference) objectInstance;
                              String factoryClassName = ref.getFactoryClassName();
                              ObjectFactory objectFactory = null;
                              ObjectFactoryInfo info = objectFactoryInfos.get(factoryClassName);
                              if (info != null) {
                                  objectFactory = info.getObjectFactoryClass().newInstance();
                              } else {
                                  objectFactory = objectFactories.getServiceWithException(factoryClassName);
                              }
                              objectInstance = objectFactory.getObjectInstance(ref, null, null, null);
                              if (objectInstance == null) {
                                  // should never happen
                                  throw new NamingException("Could not object instance from object factory " + objectFactory);
                              }
  
                          } catch (Exception ex) {
                              NamingException ne = new NamingException("Failure occurred while reconstructing remote reference object");
                              ne.initCause(ex);
                              throw ne;
                          } finally {
                              if (ois != null)
                                  try {
                                      ois.close();
                                  } catch (IOException ex) {
                                  }
                          }
  
                      }
  
                  } catch (RemoteObjectInstanceException ex) {
                      //ffdc
                      NamingException ne = new NamingException();
                      ne.initCause(ex);
                      throw ne;
                  }
              }
          }
          return objectInstance;
      }