docs: @Override
      public Object getObjectInstance(Object obj, Name name, Context context, @Sensitive Hashtable<?, ?> environment) throws Exception {
  
          if (!(obj instanceof Reference)) {
              return null;
          }
  
          Reference ref = (Reference) obj;
  
          if (!ServiceRefObjectFactory.class.getName().equals(ref.getFactoryClassName())) {
              return null;
          }
  
          // Retrieve our service-ref metadata from the Reference object.
          WebServiceRefInfo wsrInfo = null;
          WebServiceRefInfoRefAddr wsrInfoRefAddr = (WebServiceRefInfoRefAddr) ref.get(WebServiceRefInfoRefAddr.ADDR_KEY);
          if (wsrInfoRefAddr != null) {
              wsrInfo = (WebServiceRefInfo) wsrInfoRefAddr.getContent();
          }
  
          // Make sure we found the WebServiceRefInfo object that contains the service-ref metadata.
          if (wsrInfo == null) {
              throw new Exception("Internal Error: Can not found the WebServiceRefInfo.");
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "Service Ref JNDI name: " + wsrInfo.getJndiName());
          }
  
          // Get the client metadata
          JaxWsClientMetaData declaredClientMetaData = wsrInfo.getClientMetaData();
          //146981
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "declaredClientMetaData: " + declaredClientMetaData);
          JaxWsClientMetaData currentClientMetaData = JaxWsMetaDataManager.getJaxWsClientMetaData();
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "currentClientMetaData: " + currentClientMetaData);
          if (declaredClientMetaData == null) {
              declaredClientMetaData = currentClientMetaData;
          }
  
          // If we didn't find the ClientMetaData, we have a problem.
          if (declaredClientMetaData == null) {
              throw new IllegalStateException("Internal Error: Can not found the JaxWsClientMetaData");
          }
  
          mergeWebServicesBndInfo(wsrInfo, declaredClientMetaData);
  
          //1. The Bus from client module which declares the serviceRef is used for locating WSDL or other usage.
          //2. The classLoader from current client module is used for loading service interface or other related stub classes.
          //The scenario is that, different modules could packge the same stub classes in their own classpaths.
          Bus originalThreadBus = BusFactory.getThreadDefaultBus(false);
          try {
              BusFactory.setThreadDefaultBus(declaredClientMetaData.getClientBus());
              // Collect all of our module-specific service-ref metadata.            
              TransientWebServiceRefInfo tInfo = new TransientWebServiceRefInfo(declaredClientMetaData, wsrInfo, declaredClientMetaData.getModuleMetaData().getAppContextClassLoader());
              Object instance = getInstance(tInfo, wsrInfo);
              return instance;
          } finally {
              BusFactory.setThreadDefaultBus(originalThreadBus);
          }
      }