code: public Object put(Object key, Object value) {
          if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[PUT], "key = " + key);
          }
          String id = (String) key;
          BackedSession backedSess = (BackedSession) value;
          // in the unlikely case the session is created and invalidated on the same http request
          if (!backedSess.isValid()) {
              if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[PUT], "Session is not valid.  Returning null");
              }
              return null;
          }
  
          // needToInsert is set to false when successfully persisted.  Will stay true if insertSession fails because db is down.
          if (backedSess.needToInsert) {
              insertSession(backedSess);
              if (backedSess.isNew()) {
                  if (!backedSess.removingSessionFromCache) {
                      //                if ((!backedSess.removingSessionFromCache) && (!backedSess.duplicateIdDetected)) { // since duplicate keys can't be detected in lWAS, backedSess.duplicateIdDetected is always true
                      BackedSession thrownOutSess = (BackedSession) superPut(id, backedSess);
                      if (thrownOutSess != null)
                          this.passivateSession(thrownOutSess);
                  }
              } else {
                  updateSession(backedSess);
              }
          } else {
              updateSession(backedSess);
          }
          if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[PUT]);
          }
          return null;
      }
docs: /*
  put - insert and/or updates a session as appropriate