docs: public void lockSession(HttpServletRequest req, HttpSession sess) {
        String isNested = (String) req.getAttribute("com.ibm.servlet.engine.webapp.dispatch_nested");
        if (isNested == null || (isNested.equalsIgnoreCase("false"))) {
      
            try {
                long syncSessionTimeOut = (long)_smc.getSerializedSessionAccessMaxWaitTime() * 1000L; //convert to millisecond
                long syncSessionTimeOutNanos = syncSessionTimeOut * 1000000L; //convert to nanosecond
  
                // if session exits, start locking procedures
                if (sess != null) {
                    Object lock = new Object(); //create a new lock object for this request; 
                    LinkedList ll = ((SessionData)sess).getLockList(); //gets the linked lists of lock objects for this session;
                    int llsize;
                    
                    // PK09786 BEGIN -- Always synchronize on linklist before lock to avoid deadlock 
                    synchronized (ll) {
                       ((SessionData)sess).setSessionLock(Thread.currentThread(), lock); //adds thread to WsSession locks hashtable so we know who to notify in PostInvoke
                       ll.addLast(lock);
                       llsize = ll.size();
                    }       //PK19389 when another thread is in sessionPostInvoke, trying to lock linkedlist in order to notify the thread in lock.wait()
                    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[LOCK_SESSION], 
                        "size = " + llsize + " thread = " + Thread.currentThread().getId() + " lock = " + lock.hashCode());
                    }                  
                    if (llsize > 1) {
                        long before = System.nanoTime();
                        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[LOCK_SESSION], "waiting...");
                        }
                        synchronized (lock) {
                            lock.wait(syncSessionTimeOut);
                        }
                        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[LOCK_SESSION], "Done waiting.");
                        }
                        long after = System.nanoTime();
  
                        synchronized (ll) {
                            // if timed out
                            if ((after - syncSessionTimeOutNanos) >= before) {
                                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                                    LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[LOCK_SESSION], "notified after wait timed out");
                                }
                                // 118672 - we want to fail if we aren't supposed to get the access session
                                if (!_smc.getAccessSessionOnTimeout()) {
                                    ll.remove(lock);
                                    LoggingUtil.SESSION_LOGGER_CORE.logp(Level.SEVERE, methodClassName, methodNames[LOCK_SESSION], "WsSessionContext.timeOut");
                                    throw new RuntimeException("Session Lock time outException");
                                }
                            }
                        }
                    }
                // PK09786 END
                }
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[LOCK_SESSION], sess);
                }
                //return sess;
            } catch (InterruptedException e) {
                com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.webcontainer.session.impl.HttpSessionContextImpl.lockSession", "133", this);
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.SEVERE, methodClassName, methodNames[LOCK_SESSION], "CommonMessage.exception", e);
            }
        } //close if(isNested...)
    }