Details

    • Type: Sub-task
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: Calendar
    • Labels:
      None
    • Environment:
      Static Code review

      Description

      [1] org.sakaiproject.component.app.scheduler.jobs.SakaiEventArchiveJob
      Please review: Looks like the prepare statement is not closed on line 55, because it is replaced by another object on line 72

      sakaiStatement = sakaiConnection.prepareStatement(sql);
      sakaiStatement.setTimestamp(1, archiveDate);
      sakaiStatement.execute(sql);

      sql = "DELETE FROM SAKAI_SESSION WHERE SESSION_END IS NOT NULL AND SESSION_END < ?";
      LOG.info("sql="+sql);

      //sakaiStatement = sakaiConnection.prepareStatement(sql);
      //sakaiStatement.setTimestamp(1, archiveDate);
      //sakaiStatement.execute(sql);

      sakaiConnection.commit();

      // move events older than <date> to archive table
      sql = "INSERT INTO SAKAI_EVENT_ARCHIVE (SELECT * FROM SAKAI_EVENT WHERE EVENT_DATE < ?)";
      LOG.info("sql="+sql);

      sakaiStatement = sakaiConnection.prepareStatement(sql);

      [2] SchedulerManagerImpl
      InputStream not closed line 72

      public void init()
      {

      try
      {

      SqlService sqlService = org.sakaiproject.db.cover.SqlService
      .getInstance();

      // load quartz properties file
      InputStream propertiesInputStream = this.getClass().getResourceAsStream(
      qrtzPropFile);
      qrtzProperties = new Properties();
      qrtzProperties.load(propertiesInputStream);

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                a.m.berg@uva.nl Alan Berg
                Reporter:
                a.m.berg@uva.nl Alan Berg
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration