protected int updateLastAccessTime(BackedSession sess, long nowTime) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME]);
        }
        Connection con = getConnection(false);
        if (con == null)
            return 1;

        PreparedStatement s = null;
        String id = sess.getId();
        int rowsRet = 0;
        try {
            s = con.prepareStatement(asyncUpdate);
            setPSLong(s, 1, nowTime);
            s.setString(2, id);
            s.setString(3, id);
            s.setString(4, getIStore().getId()); //getId returns the appName

            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "before lastacc upd for " + id);
            }

            rowsRet = s.executeUpdate();
            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                if (rowsRet > 0) {
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "after upd (row changed " + id);
                } else {
                    //Ooops..someother jvm  has invalidated this
                    //reset the value, so that concurrent access to this session won't try
                    //update the database again.
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "row does not exist for " + id);
                }
            }

        } catch (Throwable th) {
            //            if (isStaleConnectionException(th)) {
            //                com.ibm.ws.ffdc.FFDCFilter.processException(th, "com.ibm.ws.session.store.db.DatabaseHashMap.updateLastAccessTime", "1472", sess);
            //                if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            //                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "StaleConnectionException");
            //                }
            //            } else {
            com.ibm.ws.ffdc.FFDCFilter.processException(th, "com.ibm.ws.session.store.db.DatabaseHashMap.updateLastAccessTime", "1476", sess);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "CommonMessage.sessionid", id);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "CommonMessage.exception", th);
            //            }
        } finally {
            if (s != null) {
                closeStatement(s);
            }
            closeConnection(con); //findbugs 106329
        }

        return rowsRet;
    }
protected int updateLastAccessTime ( BackedSession sess , long nowTime ) { if ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . entering ( methodClassName , methodNames [ UPDATE_LAST_ACCESS_TIME ] ) ; } Connection con = getConnection ( false ) ; if ( con == null ) return 1 ; PreparedStatement s = null ; String id = sess . getId ( ) ; int rowsRet = 0 ; try { s = con . prepareStatement ( asyncUpdate ) ; setPSLong ( s , 1 , nowTime ) ; s . setString ( 2 , id ) ; s . setString ( 3 , id ) ; s . setString ( 4 , getIStore ( ) . getId ( ) ) ; if ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , methodNames [ UPDATE_LAST_ACCESS_TIME ] , "before lastacc upd for " + id ) ; } rowsRet = s . executeUpdate ( ) ; if ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { if ( rowsRet > 0 ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , methodNames [ UPDATE_LAST_ACCESS_TIME ] , "after upd (row changed " + id ) ; } else { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , methodNames [ UPDATE_LAST_ACCESS_TIME ] , "row does not exist for " + id ) ; } } } catch ( Throwable th ) { com . ibm . ws . ffdc . FFDCFilter . processException ( th , "com.ibm.ws.session.store.db.DatabaseHashMap.updateLastAccessTime" , "1476" , sess ) ; LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . SEVERE , methodClassName , methodNames [ UPDATE_LAST_ACCESS_TIME ] , "CommonMessage.sessionid" , id ) ; LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . SEVERE , methodClassName , methodNames [ UPDATE_LAST_ACCESS_TIME ] , "CommonMessage.exception" , th ) ; } finally { if ( s != null ) { closeStatement ( s ) ; } closeConnection ( con ) ; } return rowsRet ; }
/*
Update the lastAccessedTime in the db