docs: @FFDCIgnore(NamingException.class)
      public TimedDirContext createDirContext(String principal, byte[] credential) throws NamingException {
          final String METHODNAME = "createDirContext(String, byte[])";
  
          String activeURL = getActiveURL();
          Hashtable<String, Object> environment = getEnvironment(URLTYPE_SINGLE, activeURL);
          environment.put(Context.SECURITY_PRINCIPAL, principal);
          environment.put(Context.SECURITY_CREDENTIALS, credential);
  
          SSLUtilImpl sslUtil = new SSLUtilImpl();
          Properties currentSSLProps = sslUtil.getSSLPropertiesOnThread();
          try {
              if (iSSLAlias != null) {
                  try {
                      if (tc.isDebugEnabled())
                          Tr.debug(tc, METHODNAME + " Use WAS SSL Configuration.");
                      sslUtil.setSSLAlias(iSSLAlias, environment);
                  } catch (Exception ssle) {
                      throw new NamingException(ssle.getMessage());
                  }
              }
  
              // Set the classloader so that a class in the package can be loaded by JNDI
              ClassLoader origCL = getContextClassLoader();
              setContextClassLoader(getClass());
              try {
                  TimedDirContext ctx = null;
                  try {
                      ctx = new TimedDirContext(environment, getConnectionRequestControls(), roundToSeconds(System.currentTimeMillis()));
                  } catch (NamingException e) {
                      if (!isConnectionException(e)) {
                          throw e;
                      } else {
                          if (tc.isDebugEnabled())
                              Tr.debug(tc, "Encountered an exception while creating a context: " + e.getMessage());
                      }
  
                      // Get the Next URL
                      environment = getEnvironment(URLTYPE_SEQUENCE, getNextURL(activeURL));
                      // Reset the security credentials on the environment.
                      environment.put(Context.SECURITY_PRINCIPAL, principal);
                      environment.put(Context.SECURITY_CREDENTIALS, credential);
  
                      ctx = new TimedDirContext(environment, getConnectionRequestControls(), roundToSeconds(System.currentTimeMillis()));
                      String newURL = getProviderURL(ctx);
                      long creationTimeMillisec = System.currentTimeMillis();
  
                      synchronized (iLock) {
                          // Refresh context pool if another thread hasn't already done so
                          if (creationTimeMillisec > iPoolCreateTimestampMillisec) {
                              createContextPool(iLiveContexts, newURL);
                              ctx.setCreateTimestamp(iPoolCreateTimestampSeconds);
                          }
                      }
                  }
                  return ctx;
              } finally {
                  setContextClassLoader(origCL);
              }
          } finally {
              sslUtil.setSSLPropertiesOnThread(currentSSLProps);
          }
      }