Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-9771

OSP code should not use SAKAI_SESSION table directly

    XMLWordPrintable

    Details

      Description

      These two OSP files reference the SAKAI_SESSION table directly:

      osp/reports/tool/src/webapp/WEB-INF/reports-definition.xml
      osp/warehouse/api-impl/src/java/org/theospi/portfolio/warehouse/sakai/session/SessionWarehouseTask.java

      SAKAI_SESSION belongs to events. The above is therefore fragile code which will break if an alternate session storage mechanism is used (e.g. something which doesn't use the SAKAI_SESSION db for persistence).

      This code, if it's used, looks particularly problematic as it could be reading in hundreds of thousands of records if the SAKAI_SESSION table is never cleaned out:

      // check the db
      String statement = "select SESSION_ID,SESSION_SERVER,SESSION_USER,SESSION_IP,SESSION_USER_AGENT,SESSION_START,SESSION_END"
      + " from SAKAI_SESSION";

      List sessions = sqlService.dbRead(statement, null, new SqlReader()

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                osp-jira OSP Jira Team (Inactive)
                Reporter:
                smarquard Stephen Marquard
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code