docs: protected boolean persistSession(BackedSession d2, boolean propHit) {
          if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[PERSIST_SESSION]);
          }
  
          Connection con = null;
          String id = d2.getId();
          Thread t = Thread.currentThread();
          PreparedStatement ps = null;
          boolean psClose = false;
          byte[] objbuf = null;
          int objbufLength = 0;
  
          try {
              // build update string based on what has changed
              d2.update = new StringBuffer();
              boolean didFirstCol = false;
  
              d2.update.append(upBase);
              if (d2.userWriteHit) {
                  if (didFirstCol) {
                      d2.update.append(comma);
                  }
                  d2.update.append(userCol).append(equals);
                  didFirstCol = true;
              }
  
              if (d2.maxInactWriteHit) {
                  if (didFirstCol) {
                      d2.update.append(comma);
                  } else {
                      didFirstCol = true;
                  }
                  d2.update.append(maxInactCol).append(equals);
              }
  
              if (d2.listenCntHit) {
                  if (didFirstCol) {
                      d2.update.append(comma);
                  } else {
                      didFirstCol = true;
                  }
                  d2.update.append(listenCol).append(equals);
              }
  
              if (!_smc.getEnableEOSWrite() || _smc.getScheduledInvalidation()) {
                  if (didFirstCol) {
                      d2.update.append(comma);
                  } else {
                      didFirstCol = true;
                  }
                  d2.update.append(lastAccCol).append(equals);
              }
  
              if (propHit) {
                  if (!_smc.isUsingMultirow()) {
                      if (didFirstCol) {
                          d2.update.append(comma);
                      } else {
                          didFirstCol = true;
                      }
                      objbuf = serializeAppData(d2);
                      if (objbuf != null) {
                          objbufLength = objbuf.length;
                      }
                  }
  
                  boolean success = handlePropertyHits(d2, t, objbufLength);
                  if (!success) { //325643
                      if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                          LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "returning false after handlePropertyHits");
                      }
                      return false; // 325643
                  }
              }
  
              // if nothing changed, then just return
              if (!didFirstCol) {
                  d2.update = null;
                  d2.userWriteHit = false;
                  d2.maxInactWriteHit = false;
                  d2.listenCntHit = false;
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
                      LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[PERSIST_SESSION], "true - Nothing changed");
                  }
                  return true;
              } else {
                  d2.update.append(upId);
              }
  
              con = getConnection(false);
              if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "thread " + t + " is dealing with session " + id);
              }
  
              if (con == null) {
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
                      LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[PERSIST_SESSION], "null connection on id " + id);
                  }
                  return false;
              }
  
              ps = con.prepareStatement(d2.update.toString());
              long startTime = System.currentTimeMillis();
              if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "doing a sql update of " + d2.update.toString());
              }
              int colcnt = 0;
  
              if (d2.userWriteHit) {
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "update username " + d2.getUserName());
                  }
                  colcnt++;
                  ps.setString(colcnt, d2.getUserName());
                  d2.userWriteHit = false;
              }
  
              if (d2.maxInactWriteHit) {
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "update maxinactive " + d2.getMaxInactiveInterval());
                  }
                  colcnt++;
                  ps.setInt(colcnt, d2.getMaxInactiveInterval());
                  d2.maxInactWriteHit = false;
              }
  
              if (d2.listenCntHit) {
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "update listerncnt " + d2.listenerFlag);
                  }
                  colcnt++;
                  ps.setShort(colcnt, d2.listenerFlag);
                  d2.listenCntHit = false;
              }
  
              ByteArrayInputStream bis = null;
              long time = d2.getCurrentAccessTime();
              if (!_smc.getEnableEOSWrite() || _smc.getScheduledInvalidation()) {
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "update last write time to DB !!!!!!! " + time);
                  }
                  colcnt++;
                  // shouldn't get a -1 time since already stored...
                  // I'm assuming lastAccess has been updated in the session object
                  setPSLong(ps, colcnt, time);
                  d2.setLastWriteLastAccessTime(time);
  
              }
  
              // not done in multirow, MR's handlePropertyHits will reset flag
              if (propHit && !_smc.isUsingMultirow()) {
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "update  " + time); // cmd 200713
                  }
                  colcnt++;
  
                  if ((!usingInformix) && (!_smc.isUseOracleBlob())) {
                      ps.setBytes(colcnt, objbuf);
                  } else {
  
                      bis = new ByteArrayInputStream(objbuf);
                      ps.setBinaryStream(colcnt, (InputStream) bis, objbufLength);
                  }
              }
  
              colcnt++;
              ps.setString(colcnt, id);
  
              colcnt++;
              ps.setString(colcnt, id);
  
              colcnt++; //*dbc2.2
              ps.setString(colcnt, d2.getAppName()); //*dbc2.2
  
              if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "before upd " + d2.update.toString() + " for sess " + id);
              }
  
              ps.executeUpdate();
  
              if (objbuf != null && propHit && !_smc.isUsingMultirow()) {
                  SessionStatistics pmiStats = _iStore.getSessionStatistics();
                  if (pmiStats != null) {
                      pmiStats.writeTimes(objbuf.length, System.currentTimeMillis() - startTime);
                  }
              }
  
              if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "Just wrote out Primary Row ");
              }
              ps.close();
              psClose = true;
  
              if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[PERSIST_SESSION], "thread " + t + " has sent updates for " + id);
              }
          } catch (SQLException se) {
              //            if (isStaleConnectionException(se)) {
              //                com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMap.persistSession", "2094", d2);
              //                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
              //                    LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[PERSIST_SESSION], "StaleConnectionException");
              //                }
              //            } else {
              com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMap.persistSession", "2099", d2);
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "DatabaseHashMap.ejbStoreError");
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "CommonMessage.object", d2.toString());
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "CommonMessage.miscData", " Update string: " + d2.update);
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "CommonMessage.exception", se);
              //            }
              return false;
          } catch (Exception ee) {
              com.ibm.ws.ffdc.FFDCFilter.processException(ee, "com.ibm.ws.session.store.db.DatabaseHashMap.ejbStore", "1994", d2);
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "DatabaseHashMap.ejbStoreError");
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "CommonMessage.object", d2.toString());
              LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[PERSIST_SESSION], "CommonMessage.exception", ee);
              return false;
          } finally {
              if (!psClose && ps != null)
                  closeStatement(ps);
              if (con != null)
                  closeConnection(con);
          }
          if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
              LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[PERSIST_SESSION], Boolean.valueOf(true));
          }
          return true;
      }