code: public synchronized Session newSession(Database db, User user,
                                             boolean readonly, boolean forLog,
                                             int timeZoneSeconds) {
  
          Session s = new Session(db, user, !forLog, !forLog, readonly,
                                  sessionIdCount, timeZoneSeconds);
  
          s.isProcessingLog = forLog;
  
          sessionMap.put(sessionIdCount, s);
  
          sessionIdCount++;
  
          return s;
      }
docs: Binds the specified Session object into this SessionManager's active
  Session registry. This method is typically called internally as
  the final step, when a successful connection has been made.
  
  @param db the database to which the new Session is initially connected
  @param user the Session User
  @param readonly the ReadOnly attribute for the new Session
  @param forLog true when session is for reading a log
  @param timeZoneSeconds the session time zone second interval
  @return Session